I am trying to run an SQL update statement and I am passing the SQL as a
string into a method. I am getting the following error message:
"DataAccess.java": Error #: 354 : incompatible types; found: int, required: java.sql.ResultSet at line 58, column 30"
I do not under stand the message, Your help would be greatly appreciated!!
This is the code:
public void runUpdateQuery(String sql){
//This method is called from the Business DataAccess Classes each time an
//Update needs to be made to the DataBase such as Insert, Delete statements
try{
conCounter ++;
openConnection();//Open the Connection
stmt = conn.createStatement();//Create Statement Object
rs = stmt.executeUpdate(sql
closeConnection();//Close Connection
}catch(SQLException sqle) {
System.err.println("SQL NOT Executed: " + sqle);
}//end try/catch
}//end runUpdateQuery