Subject RE: [IBO] "At end of Dataset" exception
Author Jason Wharton
I'm not sure why there is a problem. What I see below looks fine.

However, this looks like something that belongs inside a stored procedure...

Jason Wharton
www.ibobjects.com


> -----Original Message-----
> From: IBObjects@yahoogroups.com [mailto:IBObjects@yahoogroups.com]On
> Behalf Of williamvdw2004
> Sent: Monday, May 30, 2005 11:29 PM
> To: IBObjects@yahoogroups.com
> Subject: [IBO] "At end of Dataset" exception
>
>
> Hi
>
> I am using ibo to do the following.
>
> Select first 100 * from messages where status = 1
> I open the query and iterate through the rows returned and I use a
> second query (same transaction connection and session) to update the
> status to 2
>
> FTransaction.StartTransaction;
> While not FQuery.Eof do
> begin
> ...
> update messages set status = 2 where ID = FQuery.Fieldbyname('ID')
> FQuery2.Execute;
> FQuery.Next;
> end;
> FTransaction.Commit;
>
> This is a multithreaded application but Connection, queries, sessions
> and transactions are NEVER shared among threads.
>
> I get the following exception... sometimes.
>
> "At end of Dataset"
>
> Is this excepion someting to worry about? At the moment I just catch
> the exception commit the work and move on.
>
> Thanks in advance
> William