Old SQL query being ran after being updated!

Answered

I have noticed recently that when try to submit data to a database via my java web app, if I have an error and update the query in intellij, it seems to keep running it and giving me the same error event after updating the query in intellij.

 

For example the below query,

gives an error as there is an extra ' before the comments is input, but when I remove this and re run the app it still gives me the error even though I know the query is correct and works if I run in debug mode and copy the query for sql2.

 

Can anyone explain what I am doing wrong?

 

Thanks

String sql2 = "INSERT INTO `events`  VALUES (NULL,'" +name + "','" + courseId + "','" + date + "','" + postcode
+ "','" + cost + "','" + type + "','" + qualifier + "','" + maxEntrants + "',NULL," +
"','" + comments + "', NULL)";

1 comment
Comment actions Permalink

Does it help if you invoke "File | Reload all from disk" before running the app ?

0

Please sign in to leave a comment.