Return-Path: Delivered-To: apmail-incubator-ibatis-user-java-archive@www.apache.org Received: (qmail 4567 invoked from network); 28 Mar 2005 10:57:03 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 28 Mar 2005 10:57:03 -0000 Received: (qmail 92504 invoked by uid 500); 28 Mar 2005 10:57:03 -0000 Delivered-To: apmail-incubator-ibatis-user-java-archive@incubator.apache.org Received: (qmail 92477 invoked by uid 500); 28 Mar 2005 10:57:02 -0000 Mailing-List: contact ibatis-user-java-help@incubator.apache.org; run by ezmlm Precedence: bulk Reply-To: ibatis-user-java@incubator.apache.org List-Help: List-Unsubscribe: List-Post: List-Id: Delivered-To: mailing list ibatis-user-java@incubator.apache.org Delivered-To: moderator for ibatis-user-java@incubator.apache.org Received: (qmail 9347 invoked by uid 99); 27 Mar 2005 15:52:41 -0000 X-ASF-Spam-Status: No, hits=3.6 required=10.0 tests=DNS_FROM_RFC_ABUSE,DNS_FROM_RFC_POST,MSGID_FROM_MTA_HEADER,RCVD_IN_BL_SPAMCOP_NET,SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (hermes.apache.org: domain of chiangpak@hotmail.com designates 64.4.61.42 as permitted sender) Message-ID: X-Originating-IP: [64.4.61.200] X-Originating-Email: [chiangpak@hotmail.com] X-Sender: chiangpak@hotmail.com From: "Sancho Chiang" To: ibatis-user-java@incubator.apache.org Bcc: Subject: Problem with Excel+iBATIS Date: Sun, 27 Mar 2005 10:52:39 -0500 Mime-Version: 1.0 Content-Type: text/plain; format=flowed X-OriginalArrivalTime: 27 Mar 2005 15:52:39.0497 (UTC) FILETIME=[00F65390:01C532E5] X-Virus-Checked: Checked X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N Hi, I would like to ask if it's possible to use excel as the persistence layer with iBATIS doing the O/R mapping job. I have been trying to implement but get stuck with two problems. Firstly, I set up a ODBC datasource with my excel file in my machine. I tried to access the data in excel with simple JDBC command to make sure that it's working. However, when I tried to make a query with iBATIS, I got the following exception. java.sql.SQLException: [Microsoft][ODBC Excel Driver]Optional feature not implemented at sun.jdbc.odbc.JdbcOdbc.createSQLException(JdbcOdbc.java:6958) at sun.jdbc.odbc.JdbcOdbc.standardError(JdbcOdbc.java:7115) at sun.jdbc.odbc.JdbcOdbc.SQLSetConnectOption(JdbcOdbc.java:5115) at sun.jdbc.odbc.JdbcOdbcConnection.setAutoCommit(JdbcOdbcConnection.java:651) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:324) at com.ibatis.common.jdbc.SimpleDataSource$SimplePooledConnection.invoke(SimpleDataSource.java:946) at $Proxy0.setAutoCommit(Unknown Source) at com.ibatis.sqlmap.engine.transaction.jdbc.JdbcTransaction.init(JdbcTransaction.java:56) at com.ibatis.sqlmap.engine.transaction.jdbc.JdbcTransaction.getConnection(JdbcTransaction.java:89) at com.ibatis.sqlmap.engine.mapping.statement.GeneralStatement.executeQueryForList(GeneralStatement.java:119) at com.ibatis.sqlmap.engine.impl.SqlMapExecutorDelegate.queryForList(SqlMapExecutorDelegate.java:610) at com.ibatis.sqlmap.engine.impl.SqlMapExecutorDelegate.queryForList(SqlMapExecutorDelegate.java:584) at com.ibatis.sqlmap.engine.impl.SqlMapSessionImpl.queryForList(SqlMapSessionImpl.java:105) at com.ibatis.sqlmap.engine.impl.SqlMapClientImpl.queryForList(SqlMapClientImpl.java:77) at test.TestIBatis.testSelectExcel(TestIBatis.java:64) at test.TestIBatis.main(TestIBatis.java:36) It seems like the ODBC driver for excel doesn't support the setAutoCommint(). Is there anyway to get away with it? Could I just turn off the transaction manager for iBATIS? Secondly, even though I get away with the first problem by changing the source code, my sql query cannot be parsed. This is my sql: Select * from [Sheet1$] '$' is reserved word in SQL. I don't know if iBATIS can handle this kind of exceptional case. Could somebody help to solve the problem? Thx a lot Regards, Sancho Chiang _________________________________________________________________ Don�t just search. Find. Check out the new MSN Search! http://search.msn.click-url.com/go/onm00200636ave/direct/01/