Results 1 to 7 of 7

Thread: insert statement problems{Resolved}

Threaded View

  1. #1

    Thread Starter
    Frenzied Member System_Error's Avatar
    Join Date
    Apr 2004
    Posts
    1,111

    Resolved insert statement problems{Resolved}

    I'm having problems updating a database. I use the prepared statement because I want to call some methods to get the values to return. The program compiles and runs fine, but it doesn't update the database.

    Code:
    PreparedStatement stmt = databaseConnection.prepareStatement("INSERT INTO Session (Last_Name, First_Name,User_Name, Password, Gender, Email_Address) VALUES(?,?, ?, ?, ?, ?)");
     
    				stmt.setString(1, "B");
    				stmt.setString(2, "C");
    				stmt.setString(3, "D");
    				stmt.setString(4, "E");
    				stmt.setString(5, "F");
    				stmt.setString(6, "G");
    				stmt.executeUpdate();
    That's how I'm doing it. I made sure everything is the same between the DB and my code, so I don't think that's a problem.
    Last edited by System_Error; Jun 6th, 2005 at 05:57 PM.

Posting Permissions

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



Click Here to Expand Forum to Full Width