I have slightly modified your code example (see the attachment) ->
ie. the update/insert returns an INT, not a ResultSet.
The error you are reffering to (incompatible types) could be related
to how your 'kairegistration' table fields look like. In your INSERT
statement all data are inserted as String. If the DB field type is a
NUMBER (for example), you have to add your argument as a number as
well (therefore without the quotation marks around).
So check out the definition of your DB table and try the modified
example again.
the modified code lines:
1. stmt = conn.createStatement(ResultSet.TYPE_SCROLL_SENSITIVE,
ResultSet.CONCUR_UPDATABLE);
2. try {
StringBuffer sql = new StringBuffer();
String sqlString = "";
sql.append("insert into kairegistration values ('");
sql.append(studentid);
sql.append("','");
sql.append(coursenumber);
sql.append("')");
sqlString = sql.toString();
int resultDB = stmt.executeUpdate(sqlString);
}