Hi i used this coding to create table and insert the data into the table. and i used another application to get the value from the same table it shows no such table found please anyone can help..
try{
Toast.makeText(FiveActivity.this, "In try ",Toast.LENGTH_LONG).show();
db = openOrCreateDatabase( "Emergency.db", SQLiteDatabase.CREATE_IF_NECESSARY, null );
String CREATE_CONTACTS_TABLE = "CREATE TABLE if not exists userinformation (mail VARCHAR(255),pass VARCHAR(255))";
db.execSQL(CREATE_CONTACTS_TABLE);
String qu="select * from userinformation";
c=db.rawQuery(qu,null);
int count = c.getCount();
String[] values = new String[count + 1];
int i = 0;
for (c.moveToFirst(); !c.isAfterLast(); c.moveToNext()) {
values[i] = c.getString(c.getColumnIndex("mail"));
Toast.makeText(FiveActivity.this, values[i],Toast.LENGTH_LONG).show();
i++;
}
i=0;
if(count==0)
{
String Query = "insert into userinformation (mail,pass) values ('"+ mailuser+ "','" + password + "')";
db.execSQL(Query);
Toast.makeText(FiveActivity.this,"Values Inserted",Toast.LENGTH_LONG).show();
}