Android Query Retrieval.............

Put your problem here if it does not fit any of the other categories.

Android Query Retrieval.............

Postby KERALAKIDU » Tue Feb 22, 2011 11:02 am

Hi,
I am trying to create a location based android application using gps (both in windows xp and ubuntu 9.04). In my database,i am able to retrieve only the whole table content ,but can't perform row wise selection in the table.Please help me to fix this problem or suggest any other working procedure for query retrieval. My query retrieval code snippet is given.

// s is the query am trying to retrieve.
Cursor c=db.query(deptTable, null, colDeptName+"="+s, null, null, null, null);//not working

Cursor c=db.query(deptTable, null, colDeptName+"=?", new String[]{s},null, null, null, null);//not working

Cursor c=db.query(deptTable, new String[]{colDeptName}, colDeptName+"=?",new String[]{s},null, null, null);//not working
Cursor c=db.query(deptTable, null, null, null, null, null, null);//retrieved whole table content,but selection is impossible.
I have already tried all above and none satisfies my requirement.
Passingh string to my retrieval method should be by pass by refernce?If so,send me the actual code.

Regards
KERALAKIDU
Once Poster
Once Poster
 
Posts: 1
Joined: Tue Feb 22, 2011 10:05 am

Top

Return to Other Coding-Problems

Who is online

Users browsing this forum: No registered users and 9 guests