Обсуждение: I'm losing the data from a ResultSet

Поиск
Список
Период
Сортировка

I'm losing the data from a ResultSet

От
"Waldomiro"
Дата:
hi there,
 
I have a instance of a ResultSet which I've loaded some data from a table.
 
sometime  later I create a second instance of a ResultSet for some data from other table, but the fisrt instance of a ResultSet lost the data.
 
Why this happen ?
 
Is it a bug ?
 
can someone help me to create 2 instances of a ResultSet with diferent data ?
 
Thanks.
 
wmiro

Re: I'm losing the data from a ResultSet

От
Kris Jurka
Дата:

On Mon, 12 Jan 2004, Waldomiro wrote:

> hi there,
>
> I have a instance of a ResultSet which I've loaded some data from a table.
>
> sometime later I create a second instance of a ResultSet for some data
> from other table, but the fisrt instance of a ResultSet lost the data.
>

You most likely have reused a Statement object.  When you do this the
first ResultSet is discarded.  If you want two open ResultSets at the same
time, you need two Statement objects.

Kris Jurka