Error in thin JDBC driver; can anybody confirm? [message #91130] |
Tue, 23 April 2002 04:16 |
Torsten
Messages: 4 Registered: April 2002
|
Junior Member |
|
|
Hi All,
I just found out, why my Statement causes an "Unsupported syntax for refreshRow()"-SQLException after 10 next().
It seems that the oracle.jdbc.driver.ScrollableResultSet and also the oracle.jdbc.driver.SensitiveScrollableResultSet (which I use here) use the ROWID to fill the internal cache for the ResultSet. This of course fails if the SQL contains any phrase like "order by" or bases on a view containing "order by". ROWID is useless for ordered queries, since the ROWID has nothing to do with the order in which the records are displayed.
Can somebody point me to some documentation where Oracle explains this or can anybody confirm that this is an serious error (I mean, how often do you want stuff in the same order that it is in the database?).
Thanks and regards,
Torsten
|
|
|
Re: Error in thin JDBC driver; can anybody confirm? [message #91134 is a reply to message #91130] |
Fri, 26 April 2002 05:09 |
Raj
Messages: 411 Registered: November 1998
|
Senior Member |
|
|
I couldn't understand ur problem exactly. From what i understood, let me think a solution. Try to use your query as follows:
SELECT * FROM (Select column_name1,colum_name2 FROM table_name ORDER BY column_name).
Try this and lemme know.
|
|
|
Thanks Raj [message #91135 is a reply to message #91130] |
Fri, 26 April 2002 05:56 |
Torsten
Messages: 4 Registered: April 2002
|
Junior Member |
|
|
Raj,
first of all many thanks for your solution. I did some further research on this topic (mainly decompiling the Oracle classes :-) and found out that they attach a where clause for ROWIDs to othe end of my original statement. So it ended up like:
select rowid, ID from TBL_TEST order by ID WHERE ( ROWID = ? OR rowid = ? OR rowid = ? OR rowid = ? OR rowid = ? )
which is of course incorrect syntax. Your trick with the the statement in parentheses makes the syntax correct again.
Thanks and regards,
Torsten
|
|
|
|
|