-1

尝试插入数据时出现此错误

07-29 18:15:19.909: E/sqlite(863): android.database.sqlite.SQLiteException: near ",": syntax error: , while compiling: INSERT INTO transactions (details , amount) VALUES( , );

我认为错误在这一行中,无法对其进行排序对任何人都有帮助

String insertQuery = "INSERT INTO " +stdb.tname+" (" + stdb.details+" , "+stdb.amt+") VALUES("+setdet+" , "+setamt+");";
4

1 回答 1

1

看起来像setdet并且setamt是空的。这导致无效的声明:

INSERT INTO transactions (details , amount) VALUES( , );
于 2012-07-29T18:42:01.950 回答