Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / Databases / January 2004

Tip: Looking for answers? Try searching our database.

new hsqldb user with a problem

Thread view: 
Manolis Christodoulou - 05 Jan 2004 23:05 GMT
I have a problem using HSQLDB 1.7.1
Here is the code after creating a connection and a statement...

ResultSet rs=some_statement.executeQuery(some_query_string);
System.out.println(rs.getRow());

/* This prints 0 - as is expected */

rs.last();
System.out.println(rs.getRow());

/* This prints 22 - as is expected */

rs.first();
System.out.println(rs.getRow());

/* This does not print 1 as I would expect but 22 */

Which means that HSQLDB ResultSets do not go backwards.

Any solution please?
Markku Salminen - 06 Jan 2004 00:02 GMT
Check java.sql API at http://java.sun.com/j2se/1.4.2/docs/api/

"A default ResultSet object is not updatable and has a cursor that moves
forward only." Then you can try (or read database docs) if it can
manage with scrollable recordsets.

Statement stmt = con.createStatement(
                                      ResultSet.TYPE_SCROLL_INSENSITIVE,
                                      ResultSet.CONCUR_UPDATABLE);

> I have a problem using HSQLDB 1.7.1
> Here is the code after creating a connection and a statement...
[quoted text clipped - 17 lines]
>
> Any solution please?


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.