For COMPLETE TUTORIAL see here :
public void entryfield(String namestr, String nickstr) {
ContentValues cv = new ContentValues(); // Bundle for writting the database fields
cv.put(KEY_NAME, namestr);// put the values passed to ContentValues
cv.put(KEY_NICKNAME, nickstr);// put the values passed to ContentValues
db.insert(DATABASE_TABLE, null, cv);// insert into databse with vlues as "content vales"
}
in sqlite.java
//==Create an object of adapter class to call methods==
DBAdapter Entryadapter = new DBAdapter(SQliteExample.this);
Entryadapter.open();
Entryadapter.entryfield(Namestr,Nickstr); // Calling the function in DBAdapter Class
Entryadapter.close();
Comments
Post a Comment