Sqlite: change values
How can you change a record in SQLite?
In SQLite, as with all SQL databases, a record is changed using the UPDATE statement.
In the process, a record is changed with UPDATE table SET target field = new value.
In databases, it is best to always change using the unique ID so that only a single record is changed.
Update in SQLite
Code example in Java, SQLite
public void save_Note_byID(Integer
IDNote, String sTitle){
|
Calling the change to SQLite database
In this case, a .Save method of the SQLite database is called.
Under Android Java SQLite, the database class writes storage methods for external access. The user-specific .Save or .Update method can be found in the database class.
Android app-> java-> project-> MainActivity.java
public void btnSave_Clicked(View
view) {
|
Using the SQLite database on a page
The database class is usually tied in the Android app when an activity page is opened.
clsDatabase
_db; //=new Database(this); .. |