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.
String query = "insert into dept values(?,'?','?'))"; PreparedStatement pu=con.prepareStatement(query); pu.setInt(1, 2); pu.setString(2, "a"); pu.setString(3, "ss"); pu.execute(query);
疑問符を囲む引用符を削除します。
一重引用符で囲まれたプレースホルダー文字がこのエラーの原因です。それらを削除します。
String query = "insert into dept values(?,?,?))";