Hi all experts,
I am developing a program which uses the
JDBC to insert records into MS *.xls files. It worked fine for reading. But when inserting: it shows the exception:
java.sql.SQLException: [Microsoft][ODBC Excel Driver] Operation must use an updateable query.
I was so confused, because I already used PreparedStatement.executeUpdate() method, the following is my code:
******************************************************************************* ********
String insertStmnt = "INSERT INTO [test1$] values(' ', " + "'" + result +"','')";
PreparedStatement testStmnt = testConn.prepareStatement(insertStmnt);
testStmnt.executeUpdate();
******************************************************************************* ********
Any one has some suggestion?
I am so worried! Coz the project is due soon!
Thanks a lot!
Michael