試圖將數據插入我收到此錯誤錯誤rawquery:近「」
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+");";
@Squonk:謝謝主席先生 – dreamer1989 2012-07-29 18:40:45
出現這'setdet'和'setamt'沒有任何有效數據的錯誤顯示'VALUES(,)' – Squonk 2012-07-29 18:42:14
另外,查詢-strings不應該是';'-minminated **和**你的應用程序容易受到[SQL注入](http://en.wikipedia.org/wiki/SQL_injection)的影響。 – 2012-07-29 18:45:29