Skip to content
Advertisement

Inserting records to MySQL through JavaFX

I tried to insert some record into my database in MySQL using JavaFX nodes I tried getting the text from TextField and store it MySQL but I kept getting an error saying Can not issue data manipulation statements with executeQuery(). I will upload the code I wrote and the error I have got down below.

The Code I Wrote

JavaScript

The Error I got

JavaScript

Advertisement

Answer

Have you tried using executeUpdate() instead of executeQuery?

User contributions licensed under: CC BY-SA
10 People found this is helpful
Advertisement