我有以下代码:
try{
String select2 = "INSERT INTO employees VALUES (17, 'Adam', 'Kizzam', 'aa@zz.com', '123-456-7890', '12-DEC-00', '1234', '12345.23, 50', '12.25', 1222, 4769 ) ";
PreparedStatement preparedStatement2 = connection.prepareStatement(select2); // dbConnection. prepareStatement(selectSQL);
ResultSet rs2 = preparedStatement2.executeUpdate(select2);
while (rs.next()) {
String userid = rs.getString("EMPLOYEE_ID");
String username = rs.getString("FIRST_NAME");
System.out.println ("the userid , username are " + userid + " " + username);
} }
这给了我以下错误:
错误(54,77):不兼容的类型; required:java.sql.ResultSet; 发现:
int DBConnection.java C:\ JDeveloper \ mywork \ OracleDatabaseApp \ OracleDatabaseApp \ src \ oracledatabaseapp OracleDatabaseApp.jpr