Home » Developer & Programmer » JDeveloper, Java & XML » Error in thin JDBC driver; can anybody confirm?
Error in thin JDBC driver; can anybody confirm? [message #91130] Tue, 23 April 2002 04:16 Go to next message
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 Go to previous messageGo to next message
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 Go to previous messageGo to next message
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
Thanks Raj [message #91339 is a reply to message #91130] Thu, 18 July 2002 01:42 Go to previous messageGo to next message
Andrej
Messages: 7
Registered: April 2002
Junior Member
Thank you Raj, your message saved me hours of research!

Andrej
Re: Error in thin JDBC driver; can anybody confirm? [message #91658 is a reply to message #91130] Mon, 30 December 2002 05:33 Go to previous message
Biju Sanakan
Messages: 1
Registered: December 2002
Junior Member
You can use statement object's setFetchSize() to increase the number of rows fetch by the ResultSet. This is useful only if you have a limited no of rows in the ResultSet.

stmt.setFetchSize(200);
result = stmt2.executeQuery(strSQL);
Previous Topic: I need a plenty of oracle test questions, as I am preparing for OCP.
Next Topic: Java Stored Procedures
Goto Forum:
  


Current Time: Fri Apr 19 16:01:12 CDT 2024