How to insert query in the DBAdapter? This is my sql insert query. Its create fields & values at runtime. Then need to execute.
This is my code:
public void insertTableRecord(String strTableName, String strToFields, String strValues){
String Sql = "Insert into " + strTableName + "(" + strToFields + ") Values (" + strValues + " )";
DBAdapter dbAdapter = DBAdapter.getDBAdapterInstance(DownlaodTableActivity.this);
dbAdapter.openDataBase();
ContentValues initialValues = new ContentValues();
//initialValues.put("how to give", ??how to give);
long n = dbAdapter.insertRecordsInDB(strTableName, null, initialValues);
}
Please tell me how to do this part.
Please help me..
Thanks in advance..