This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes JDBC and the fly likes Insert VALUE from JTEXTFIELD to DATABASE Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Databases » JDBC
Bookmark "Insert VALUE from JTEXTFIELD to DATABASE " Watch "Insert VALUE from JTEXTFIELD to DATABASE " New topic
Author

Insert VALUE from JTEXTFIELD to DATABASE

Rui Kim
Greenhorn

Joined: Jul 12, 2011
Posts: 3
Hi guys I'm using usbwerver mySQL for my database and netbeans 7.0 with Glassfish server 3.1 as my server..my project is a Java Desktop Applicaion with Basic Database.
just wanna know how do I insert values which are inputted by a user from my JTEXTFIELD and insert it to my DATABASE? and where exactly should I put it? I really need your help here guys T.T thanks in advance





Madhan Sundararajan Devaki
Ranch Hand

Joined: Mar 18, 2011
Posts: 312

You should put your insert statement(s) in the button click event of your Save button (if you have one).

I am wondering, why a Desktop application uses GlassFish server for!


S.D. MADHAN
Not many get the right opportunity !
 
wood burning stoves
 
subject: Insert VALUE from JTEXTFIELD to DATABASE
 
Similar Threads
Insert VALUE from JTEXTFIELD to DATABASE [I accidentally clicked the RESOLVED button :| ]
ps statement in jsp
Just realise something interesting about Date in Java and SQL
HTML Form/Servlet Problem
SQLServerException: The statement must be run before the generated keys are available