Results 1 to 3 of 3
  1. #1
    javahsm is offline Member
    Join Date
    Nov 2008
    Posts
    3
    Rep Power
    0

    Default designing form to input into database

    I need help about inserting into mysql database. Am able to connect and retive data from the database but am not able to input into it with my form

  2. #2
    serjant's Avatar
    serjant is offline Senior Member
    Join Date
    Jun 2008
    Location
    Ukraine,Zaporozhye
    Posts
    487
    Rep Power
    7

    Default

    you should make a query string ,then with Statement you call executeUpdate() method with that query paramter

    Java Code:
    String query="UPDATE <name of the table> SET <clomumn> WHERE <column>=?";
    Connection con=DriverManager.getConnection(<your driver>);
    		    Statement stmt = con.createStatement();
    		    stmt.executeUpdate(query);
    Last edited by serjant; 11-29-2008 at 07:21 PM.

  3. #3
    javahsm is offline Member
    Join Date
    Nov 2008
    Posts
    3
    Rep Power
    0

Similar Threads

  1. Compare date input to database with current date
    By hungleon88 in forum Advanced Java
    Replies: 2
    Last Post: 11-25-2008, 08:10 AM
  2. Need help for coding and designing
    By g.ganiraju in forum New To Java
    Replies: 11
    Last Post: 11-01-2008, 04:49 AM
  3. Designing a GUI based solution- Suggestion required
    By Mohantek in forum AWT / Swing
    Replies: 10
    Last Post: 10-17-2008, 03:11 PM
  4. advise on designing an ejb application
    By bobD in forum New To Java
    Replies: 0
    Last Post: 09-03-2008, 09:04 AM
  5. Inserting data to database from the form
    By Ms.Ranjan in forum JavaServer Pages (JSP) and JSTL
    Replies: 2
    Last Post: 06-17-2008, 01:06 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •