Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
データの更新に問題があります。これに値を渡すために、準備済みステートメントを使用しました。
"UPDATE Employee SET " + name + " = ? WHERE Employee_ID = ?"
これは例外 " you have an error in your sql syntax" です。
you have an error in your sql syntax
指定されたクエリでは、 + name + は変数のように見えますが、 Employeeを取得したため、基になるテーブルの列名と一致する必要があります。列が存在しない場合は、例外がスローされます。
"UPDATE Employee SET col_name(table column name) = ? Where Employee_Id = ?"