+ 1

JDBC Insert Value to Database from JTextField

https://code.sololearn.com/ctW63vN68XG3/#java I have this program that im trying to INSERT data into the database (Microsoft SQL) through the jtextfield but whenever i press the Signup button(ActionListener), it prints "The connection is closed"

17th Oct 2017, 5:32 AM
Dexter Siah
Dexter Siah - avatar
3 Answers
+ 11
You've initiated the connection @ StartConnection method but it gets terminated immediately in the finally block.
17th Oct 2017, 5:57 AM
Zephyr Koo
Zephyr Koo - avatar
+ 6
You're welcome! 😉
17th Oct 2017, 6:23 AM
Zephyr Koo
Zephyr Koo - avatar
+ 1
OKAY... problem solved i did not notice that part as i thought it was something wrong with the preparedStatement section... thank you @Zephyr Koo
17th Oct 2017, 6:07 AM
Dexter Siah
Dexter Siah - avatar