Error in updating record - Please help

Can anyone please help to explain why there's such error message? (I copy this code from the textbook.)

******

Root cause:

java.lang.ArrayIndexOutOfBoundsException

*****

<%

Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");

Connection con = DriverManager.getConnection("jdbc:odbc:mydatabase777");

Statement updStmt = con.createStatement(ResultSet.TYPE_SCROLL_SENSITIVE,ResultSet.CONCUR_UPDATABLE);

ResultSet updRs = updStmt.executeQuery("SELECT * FROM Employees");

updRs.moveToInsertRow();

updRs.updateInt("employee_id",104);

updRs.updateString("name","George");

updRs.updateInt("extension",1871);

updRs.insertRow();

con.close();

%>

[746 byte] By [s29763] at [2007-9-26 2:35:33]
# 1
Are you sure you have copied it properly?IMO: the statement "Select * ..." should be changed to "Insert into.."and it will work.
Dipanc at 2007-6-29 10:02:06 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 2
Yes, the select statement is there. What I don't understand is that I did not use any array anywhere, so why the array error?
s29763 at 2007-6-29 10:02:06 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 3
I have checked the code. There is no problem in the current portion of the code, you have provided (I was wrongly thinking it should be insert into....!! mistake)I have tested with Oracle Database and classes12.zip in classpath. It ran smoothly.
Dipanc at 2007-6-29 10:02:06 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...