{"id":666,"date":"2005-03-30T22:33:56","date_gmt":"2005-03-31T02:33:56","guid":{"rendered":"http:\/\/wordpress.cephas.net\/?p=666"},"modified":"2005-03-30T22:33:56","modified_gmt":"2005-03-31T02:33:56","slug":"older-mysql-jdbc-driver-issues-with-insert-update-delete","status":"publish","type":"post","link":"https:\/\/cephas.net\/blog\/2005\/03\/30\/older-mysql-jdbc-driver-issues-with-insert-update-delete\/","title":{"rendered":"Older MySQL JDBC Driver issues with INSERT, UPDATE, DELETE"},"content":{"rendered":"<p>I haven&#8217;t worked on <a href=\"http:\/\/karensrecipes.com\/\">my wife&#8217;s recipe site<\/a> in ages. Originally written as an experiment with JSP and Java, I think my mom and Karen are the only people that use it (which is fine with me).  In any case, I recently moved it to a new host and saw a weird issue pop up in catalina.out where any INSERT, UPDATE or DELETE statements were erroring out with the message:<br \/>\n<code><br \/>\njava.sql.SQLException: Can not issue data manipulation statements with executeQuery()<br \/>\n<\/code><br \/>\nTurns out that <a href=\"http:\/\/downloads.mysql.com\/archives.php\">earlier versions of the MySQL JDBC driver<\/a> allowed you to run INSERT \/ UPDATE \/ DELETE statements using the executeQuery() method of the <a href=\"http:\/\/java.sun.com\/j2se\/1.5.0\/docs\/api\/java\/sql\/PreparedStatement.html\">PreparedStatement<\/a> class, which violated the <a href=\"http:\/\/java.sun.com\/products\/jdbc\/\">JDBC specification<\/a>, but worked nonetheless.  The newer versions are JDBC compliant and don&#8217;t allow that behavior, which causes the above mentioned SQL exception. <a href=\"http:\/\/forums.mysql.com\/read.php?39,196,196\">More from the MySQL forums<\/a>.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I haven&#8217;t worked on my wife&#8217;s recipe site in ages. Originally written as an experiment with JSP and Java, I think my mom and Karen are the only people that use it (which is fine with me). In any case, I recently moved it to a new host and saw a weird issue pop up &hellip; <a href=\"https:\/\/cephas.net\/blog\/2005\/03\/30\/older-mysql-jdbc-driver-issues-with-insert-update-delete\/\" class=\"more-link\">Continue reading <span class=\"screen-reader-text\">Older MySQL JDBC Driver issues with INSERT, UPDATE, DELETE<\/span> <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[3,12],"tags":[],"_links":{"self":[{"href":"https:\/\/cephas.net\/blog\/wp-json\/wp\/v2\/posts\/666"}],"collection":[{"href":"https:\/\/cephas.net\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/cephas.net\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/cephas.net\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/cephas.net\/blog\/wp-json\/wp\/v2\/comments?post=666"}],"version-history":[{"count":0,"href":"https:\/\/cephas.net\/blog\/wp-json\/wp\/v2\/posts\/666\/revisions"}],"wp:attachment":[{"href":"https:\/\/cephas.net\/blog\/wp-json\/wp\/v2\/media?parent=666"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/cephas.net\/blog\/wp-json\/wp\/v2\/categories?post=666"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/cephas.net\/blog\/wp-json\/wp\/v2\/tags?post=666"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}