これは私がerror code 1054
取得していたコードJDBCの更新エラー - エラーコード1054
PreparedStatement res1 = null;
String insertUser = "INSERT INTO users (uid,firstname,lastname,score) VALUES (" +
this.getFbUid() + "," +
this.getFbFirstName() + "," +
this.getFbLastName() + ",0)";
System.out.println(insertUser);
try
{
res1 = connection.prepareStatement(insertUser);
res1.executeUpdate();
System.out.println("executed query to db with the message" + res1);
}
catch(SQLException e)
{
System.out.println("setUserInDb: " +e.getMessage());
System.out.println("error num: " +e.getErrorCode());
}`
です:挿入しようとしたときに「フィールドリスト」で
不明な列「アロン」をライン「(UID、FIRSTNAME、LASTNAME、スコア)VALUES(123456、アロン、xyzは、0)dBで
Iは持つテーブルusers
を持つユーザー。INSERT INTO 210カラムuid
,firstname
,lastname
およびscore
である。
何が間違っていますか?むしろ
javaでの文字列の修正方法 – Alon
準備済みの文 –
私はそれを使用しませんでしたか?コードを参照してください – Alon