http://jakarta.apache.org/poi/
SC> Hi, SC> I would like to ask if it's possible to use excel as the persistence layer SC> with iBATIS doing the O/R mapping job. I have been trying to implement but SC> get stuck with two problems. SC> Firstly, I set up a ODBC datasource with my excel file in my machine. I SC> tried to access the data in excel with simple JDBC command to make sure that SC> it's working. However, when I tried to make a query with iBATIS, I got the SC> following exception. SC> java.sql.SQLException: [Microsoft][ODBC Excel Driver]Optional feature not SC> implemented SC> at sun.jdbc.odbc.JdbcOdbc.createSQLException(JdbcOdbc.java:6958) SC> at sun.jdbc.odbc.JdbcOdbc.standardError(JdbcOdbc.java:7115) SC> at sun.jdbc.odbc.JdbcOdbc.SQLSetConnectOption(JdbcOdbc.java:5115) SC> at SC> sun.jdbc.odbc.JdbcOdbcConnection.setAutoCommit(JdbcOdbcConnection.java:651) SC> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) SC> at SC> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) SC> at SC> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) SC> at java.lang.reflect.Method.invoke(Method.java:324) SC> at SC> com.ibatis.common.jdbc.SimpleDataSource$SimplePooledConnection.invoke(SimpleDataSource.java:946) SC> at $Proxy0.setAutoCommit(Unknown Source) SC> at SC> com.ibatis.sqlmap.engine.transaction.jdbc.JdbcTransaction.init(JdbcTransaction.java:56) SC> at SC> com.ibatis.sqlmap.engine.transaction.jdbc.JdbcTransaction.getConnection(JdbcTransaction.java:89) SC> at SC> com.ibatis.sqlmap.engine.mapping.statement.GeneralStatement.executeQueryForList(GeneralStatement.java:119) SC> at SC> com.ibatis.sqlmap.engine.impl.SqlMapExecutorDelegate.queryForList(SqlMapExecutorDelegate.java:610) SC> at SC> com.ibatis.sqlmap.engine.impl.SqlMapExecutorDelegate.queryForList(SqlMapExecutorDelegate.java:584) SC> at SC> com.ibatis.sqlmap.engine.impl.SqlMapSessionImpl.queryForList(SqlMapSessionImpl.java:105) SC> at SC> com.ibatis.sqlmap.engine.impl.SqlMapClientImpl.queryForList(SqlMapClientImpl.java:77) SC> at test.TestIBatis.testSelectExcel(TestIBatis.java:64) SC> at test.TestIBatis.main(TestIBatis.java:36) SC> It seems like the ODBC driver for excel doesn't support the SC> setAutoCommint(). Is there anyway to get away with it? Could I just turn off SC> the transaction manager for iBATIS? SC> Secondly, even though I get away with the first problem by changing the SC> source code, my sql query cannot be parsed. This is my sql: Select * from SC> [Sheet1$] SC> '$' is reserved word in SQL. I don't know if iBATIS can handle this kind of SC> exceptional case. SC> Could somebody help to solve the problem? Thx a lot SC> Regards, SC> Sancho Chiang SC> _________________________________________________________________ SC> Don’t just search. Find. Check out the new MSN Search! SC> http://search.msn.click-url.com/go/onm00200636ave/direct/01/ -- С уважением, Andrey mailto:[EMAIL PROTECTED]