尝试插入数据时我收到此错误
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+");";
答案 0 :(得分:1)
似乎setdet
和setamt
都是空的。这导致无效的声明:
INSERT INTO transactions (details , amount) VALUES( , );