I just read the spec... http://java.sun.com/j2se/1.4/docs/api/java/sql/ResultSetMetaData.html#isAuto Increment(int)
It says nothing about throwing an Exception if something is unsupported. It simply says that the method should return false if autoincrement is not available. Hsqldb is wrong. That dude who wrote the email is wrong. People who write code should not have to write a try/catch around every method call in case it throws an sqlexception when something isn't supported. That is absurd. If it isn't supported, return false. Try/catch is a very expensive operation in the JVM and it is also something that hotspot can't optimize code within a try/catch...absurd to write every line in a try/catch... -jon on 8/9/02 1:55 PM, "Saimon Moore" <[EMAIL PROTECTED]> wrote: > Hi, > > Two points: > > 1. I'm trying to get torque (3.0b4) going using the latest hsqldb release > 1.7.0 but I've run into a problem. It appears > > that in com.workingdogs.village.Column (line 150) we have this line : > > this.autoIncrement = rsmd.isAutoIncrement(columnNumber); > > This assumes either a true or false will be returned whereas the hsqldb 1.7.0 > driver throws an SQLException (It is not supported ) > which prevents torque from inserting or updating etc... > > > I found this: > > http://sourceforge.net/forum/message.php?msg_id=1606182 > > I'm not to sure what course of action I should take: > > 1. hack 1.7.0's org.hsqldb.jdbcResultSet to always return false > (NOTE: hsqldb1.6.1 just returns false but I like the new features in 1.7.0) > > or > > 2. Submit a patch for Column.java e.g. > > > try > { > this.autoIncrement = rsmd.isAutoIncrement(columnNumber); > } > > catch (Exception e) > { > this.autoIncrement = false; > } > > What do you reckon? Has anyone else comes up across this situation. > -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
