androidsqlite动态插入查询
如何在DBAdapter中插入查询?这是我的sql插入查询。它可以在运行时创建字段和值。然后需要执行 这是我的代码:androidsqlite动态插入查询,android,sqlite,Android,Sqlite,如何在DBAdapter中插入查询?这是我的sql插入查询。它可以在运行时创建字段和值。然后需要执行 这是我的代码: public void insertTableRecord(String strTableName, String strToFields, String strValues){ String Sql = "Insert into " + strTableName + "(" + strToFields + ") Values (" + strValues + "
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);
}
请告诉我怎么做这个部分
请帮帮我
提前感谢..尝试
initialValues.put(strofields,strValue)代码>