private void SubmitActionPerformed(java.awt.event.ActionEvent evt) {                                       
        try
        {
        Statement s = con.createStatement();
        Statement s1 = con.createStatement();
        Statement s2 = con.createStatement();
        Statement s3 = con.createStatement();
                
        ResultSet rs = s.executeQuery("select MAX(Guest_ID) from Guests");
        rs.next();
       int maxGuestID = rs.getInt(1) + 1;
       //s1.execute("insert into Guests values(" + maxGuestID + ",'" + txtUserName.getText() + "',' " + txtUserAddress.getText() + "','"+ txtUserPhone.getText() + "','"+ txtUserEmail.getText() + "','" + cmbCreditCardType.getSelectedItem() + "','"+ txtCreditCardNumber.getText() + "')");

        // insert data into reservation table
        ResultSet rs1 = s2.executeQuery("select MAX(Reservation_ID) from Reservation");
       rs1.next();
       int maxResID = rs1.getInt(1) + 1;
  //i'm getting error for date     
       s3.execute("insert into Reservation values(" + maxResID + "," + maxGuestID +",'"+ChkPrepaid.getSelectedObjects()+",'"+txtCheckInDate.getText()+"','"+txtCheckOutDate.getText()+ "'");
       
       
        }
        catch(Exception e)
        {
                    System.out.println("Error: " + e);
        }

You print your failing query string on screen.
Copy it and execute in mysql query browser or phphmyadmin or msql prompt directly. There you will find the actual problem.

System.out.println("insert into Reservation values(" + maxResID + "," + maxGuestID +",'"+ChkPrepaid.getSelectedObjects()+",'"+txtCheckInDate.getText()+"','"+txtCheckOutDate.getText()+ "'");

i suggest building the sql query or non-query so that when it fails you can print the query and check whats happening, its usually a problem with the way the query is built.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.