i'm new in Android. So i have created the following database...
public class database {
private Db DbHelper;
private Context ct;
private SQLiteDatabase database;
private static class Db extends SQLiteOpenHelper{
public Db(Context context) {
super(context, "db", null, 1);
// TODO Auto-generated constructor stub
}
@Override
public void onCreate(SQLiteDatabase db) {
// TODO Auto-generated method stub
String query;
query = "CREATE TABLE currency (USD, GBP, EUR, CAD)";
db.execSQL(query);
}
@Override
public void onUpgrade(SQLiteDatabase arg0, int arg1, int arg2) {
// TODO Auto-generated method stub
}}
public database(Context c){
ct = c;
}
}
Now i want to add a row of values to the table "currency" which i'll use later in my app. I want to add them in my code like:
INSERT INTO currency
VALUES (2.1, 2.2, 2.3, 2.4);
How can i do that? Please help!