---------------------------------------------------------------------
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email
I'm really not familiar with HSQLDB, but I'm curious about the
statement that's triggering the error, as I have some Oracle issues
that are in the same vein. The way the error comes from HSQLDB makes
me wonder if it's something about the INSERT statement in your code
that's considered invalid by HSQLDB. If it's something you can post,
I'd be interested to have a look at it.
Good Luck!
John
I'm really not familiar with HSQLDB, but I'm curious about the
statement that's triggering the error, as I have some Oracle issues
that are in the same vein. The way the error comes from HSQLDB makes
me wonder if it's something about the INSERT statement in your code
that's considered invalid by HSQLDB. If it's something you can post,
I'd be interested to have a look at it.
I'm curious how the IDENTITY function would interact with transactions
in HSQLDB. In Oracle, I would have to use the highest level of
transaction isolation ('serializable'/'snapshot') which seems that it
would put my code at risk of having performance problem if it avoids
the race condition. You can avoid that by requesting the new, unused
sequence number first and supplying it in the INSERT, as long as you
don't care that some sequence number could be skipped due to
exceptions.
In Oracle, that looks like.
sql.execute('INSERT INTO employee (ID, "firstName", "lastName", "age",
"departmentId") VALUES (?,?,?,?,?)',
[sql.firstRow("SELECT sequence_name.next_val FROM dual")[0], fn,
ln, age, dept])
I'm just beginning to think about out how the executeInsert method
will work with Oracle. My ojdbc6 driver returns true for
supportsGetGeneratedKeys. What does your HSQLDB driver say?
---------------------------------------------------------------------
I'm just beginning to think about out how the executeInsert method
will work with Oracle. My ojdbc6 driver returns true for
supportsGetGeneratedKeys. What does your HSQLDB driver say?
---------------------------------------------------------------------