SQL 1064 Syntax Error using a JDBC prepared statement

后端 未结 3 1116
暗喜
暗喜 2021-01-22 19:39

I have:

String query = \"INSERT INTO Basestations VALUES(?, ?, ?, ?, ?, ?, ?,\"
               + \"?, ?, ?, ?, ?, ?, ?, ?)\";                  


PreparedStateme         


        
3条回答
  •  日久生厌
    2021-01-22 19:55

    In your last line you don't need pass the variable query.

    So change

     prep.executeUpdate(query);
    

    For:

     prep.executeUpdate();
    

提交回复
热议问题