db-derby-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Kristian Waagan <Kristian.Waa...@Sun.COM>
Subject Re: Re-using an existing db and archiving data
Date Tue, 18 Mar 2008 11:23:15 GMT
Mark Hiles wrote:
> bradm6406 <bradm6406@...> writes:
> 
>> Any chance that you are not committing your transactions?  Changed data
>> would appear to be there while you're connected to the database but
>> disconnecting (without a commit) and then re-connecting it would appear as
>> though your database was overridden, when really the data was never saved.
>>
>> Brad
>>
> 
> Thanks, my problem is now solved. I was forgetting to commit my data before
> disconnecting from the db. 
> 
> Unfortunately, I have a new issue. I've been using the next() method to run
> through a ResultSet. But a lot of the other methods I try using, I receive an
> error stating that I'm not using a scrolling cursor. 
> 
> For example, I don't see why I can use next() but not previous().. I'm trying to
> count the number of results from a specific query..
> 

Hello Mark,

Most other navigational methods on a result set requires that you 
explicitly ask for a scrollable result set when you execute/prepare the 
statement producing it.
A good place to start looking would be the JavaDoc for the various 
Connection.prepareStatement methods, and there is also some explanation 
in the JavaDoc for ResultSet I believe.


And just for completeness, why go backwards if you only need to go 
forwards :) Might of course not be true for your specific application.



regards,
-- 
Kristian


Mime
View raw message