Invalid SQL type: sqlKind = UNINITIALIZED error is shown

前端 未结 4 2050
慢半拍i
慢半拍i 2021-01-13 08:35
    String s1 = PasswordText4.getText();
    String s2 = ConfirmText4.getText();
    String s3 = NameText4.getText();
    String s4 = UsernameText4.getText();
    St         


        
4条回答
  •  攒了一身酷
    2021-01-13 09:03

    You can do something likewise,

    String sql = "UPDATE LOGIN SET USERNAME = ?, PASSWORD = ?, NAME = ? WHERE USERNAME = ?" 
    
    PreparedStatement preparedStatement = dbConnection.prepareStatement(sql);
    preparedStatement .setString(1, UsernameText4.getText());
    preparedStatement .setString(2, PasswordText4.getText());
    preparedStatement .setString(3, NameText4.getText());
    preparedStatement .setString(4, jLabel16.getText());
    
    preparedStatement .executeUpdate();
    ....
    dbConnection.commit();
    

提交回复
热议问题