我正在使用qlite数据库。 我使用以下代码储存数据库中的三个数值。
sampleDB = this.openOrCreateDatabase(SAMPLE_DB_NAME, MODE_PRIVATE, null);
sampleDB.execSQL("CREATE TABLE IF NOT EXISTS " + SAMPLE_TABLE_NAME
+ " (rowid INT , songname VARCHAR," + " count INT);");
int len = songlist.size();
Log.v("songlist len", Integer.toString(len));
for (int s = 0; s < songlist.size(); s++) {
sampleDB.execSQL("INSERT INTO " + SAMPLE_TABLE_NAME +
" Values (1,"+songlist.get(s)+",1);");
Log.v("After insert", "1");
}
我犯了以下错误:
01-13 20:58:08.903: E/AndroidRuntime(593): Caused by: android.database.sqlite.SQLiteException: no such column: android: INSERT INTO freq Values (1,android,1);
需要帮助。