[ojb-users] Modifications to Work Around Lame ODBC Drivers...
Brought to you by:
thma
From: Corey K. <Co...@kl...> - 2002-04-17 13:46:35
|
Since I am working with a legacy ODBC driver from Simba, I have had to work around exceptions which propogate up from that level. It would be great if I could get some feedback on the implications of these changes -- all in accesslayer. 1.) In ConnectionFactoryDefaultImpl, I commented out conn.setAutoCommit(!broker.isInTransaction()). I'm assuming autocommit can remain in its default state of true if transactions are not being used. 2.) In StatementsForClass I commented out result.setEscapeProcessing(ESCAPEPROCESSING); It doesn't look like this should have any effect. This is the javadoc for setEscapeProcessing(): Sets escape processing on or off. If escape scanning is on (the default), the driver will do escape substitution before sending the SQL statement to the database. Note: Since prepared statements have usually been parsed prior to making this call, disabling escape processing for PreparedStatements objects will have no effect. Finally, these are obviously not general solutions. I think you will need to catch exceptions and react in some rational way. This may be a better mail for the developers list... With these changes, OJB is now reading some simple records from our lumbering accounting system. Corey |