NotNotAndroid
NotNotAndroid

Reputation: 125

How to read from a sqlite database and then display it and then delete it in android?

Hi I'm new to android and I got my location writing to a sqlite database but now I want the top line (ordered by id) to be read and sent to a server (got this working) and then deleted. is there some sort of code I need to do this as if (cursor.moveToFirst()) { dose not seem to work?

Upvotes: 1

Views: 174

Answers (1)

kannappan
kannappan

Reputation: 2250

try this code

 cursor.moveToFirst();
while(!cursor.isAfterLast())            
{
 //do something 
 cursor.getString(columnname);  
 cursor.moveToNext();           
}

Upvotes: 1

Related Questions