Trouble executing a MySQL delete statement in Java

后端 未结 6 1803
旧时难觅i
旧时难觅i 2021-01-14 12:41

I am trying to have this code run and delete a certain record in a MySQL database but I get this error:

SQLException: Can not issue data manipulation stateme         


        
6条回答
  •  花落未央
    2021-01-14 13:19

    Use executeUpdate instead of executeQuery. JDBC is bummed because the delete statement does not return a record set, as executeQuery expects.

提交回复
热议问题