Search...
FAQs
Subscribe
Pie
FAQs
Recent topics
Flagged topics
Hot topics
Best topics
Search...
Search within Android
Search Coderanch
Advance search
Google search
Register / Login
Post Reply
Bookmark Topic
Watch Topic
New Topic
programming forums
Java
Mobile
Certification
Databases
Caching
Books
Engineering
Micro Controllers
OS
Languages
Paradigms
IDEs
Build Tools
Frameworks
Application Servers
Open Source
This Site
Careers
Other
Pie Elite
all forums
this forum made possible by our volunteer staff, including ...
Marshals:
Campbell Ritchie
Ron McLeod
Tim Cooke
Paul Clapham
Liutauras Vilda
Sheriffs:
Junilu Lacar
Rob Spoor
Jeanne Boyarsky
Saloon Keepers:
Stephan van Hulst
Carey Brown
Tim Holloway
Piet Souris
Bartenders:
Forum:
Android
What I was trying to do here is to display the data in SQLite on my Profile page. But I can't seem t
Wonka Willy
Greenhorn
Posts: 1
posted 2 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
This is my MainActivity.Java
Cursor cursor =dbHelper.viewData(); StringBuilder stringBuilder = new StringBuilder(); while (cursor.moveToNext()){ stringBuilder.append( ""+cursor.getString(0) + ""+ cursor.getString(1) + ""+ cursor.getString(2) + ""+ cursor.getString(3) + ""+ cursor.getString(4) + ""+ cursor.getString(5) + ""+ cursor.getString(6)); }
This is my DatabaseHelper.Java
public Cursor viewData(){ SQLiteDatabase dbHelper = this.getReadableDatabase(); Cursor cursor = dbHelper.rawQuery("select * from "+ TABLE_NAME,null); return cursor; } }
This is my profile.Java
while (cursor.moveToNext()){ stringBuilder.append(""+cursor.getString(0) + ""+ cursor.getString(1) + ""+ cursor.getString(2) + ""+ cursor.getString(3) + ""+ cursor.getString(4) + ""+ cursor.getString(5) + ""+ cursor.getString(6)); } return; } }
Randy Tong
Rancher
Posts: 660
10
I like...
posted 2 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
Did you hit any exception?
Life is but a BREATH
joke time: What is brown and sticky? ... ... ... A stick! Use it to beat this tiny ad!
The Low Tech Laboratory Movie Kickstarter is LIVE NOW!
https://www.kickstarter.com/projects/paulwheaton/low-tech
reply
reply
Bookmark Topic
Watch Topic
New Topic
Boost this thread!
Similar Threads
SQLite data query
I have problems: below are correct[DataManipulator.java]
put in LIST Sample Data to debug, also how view SQLITE DB Data from Eclipse IDE for debug purposes
SQLiteexception table triplog has no column named name
implementation login and user profile using sqlite by APWESLK
More...