How to update row in gridview?

How do I update a row in a SQLite database?

  • So far I have: update values subname=maths mark=90 where key =s1,

  • Answer:

    ContentValues data=new ContentValues(); data.put("Field1","bob"); data.put("Field2",19); data.put("Field3","male"); DB.update(Tablename, data, "_id=" + id, null);

Abhishek Gupta at Quora Visit the source

Was this solution helpful to you?

Other answers

SQLite is a open source, lightweight, single tier relational DBMS SQLite, is a powerful SQL database library. Following are some function in a "Cursor" class, which helps nevigation within result set. moveToFirst Moves the cursor to the first row in the query result moveToNext Moves the cursor to the next row moveToPrevious Moves the cursor to the previous row getCount Returns the number of rows in the result set getColumnName Returns the name of the specified column index getColumnNames Returns a string array of all the column names in the current Cursor moveToPosition Moves the Cursor to the specified row getPosition Returns the current Cursor position Following this link : http://www.theappguruz.com/blog/android-using-sqlite-database

Finaa Amelia

Related Q & A:

Just Added Q & A:

Find solution

For every problem there is a solution! Proved by Solucija.

  • Got an issue and looking for advice?

  • Ask Solucija to search every corner of the Web for help.

  • Get workable solutions and helpful tips in a moment.

Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.