From: Milan Babuskov <albis@eu...> - 2005-02-23 13:33:30
Michael Hieke wrote:
> Update of /cvsroot/fbmanager/mghie/src
> In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14494
> Modified Files:
> Log Message:
> Fix for row fetching in IDLE event handler
Strange. I Still see problems.
I did a select * from table with 7 rows. All fine.
I did a select * from table with 3152 rows. Fetched them all (scrolled
the grid to the end). All fine.
Then I did a SELECT * from even larger table. I scrolled down for
2000+ records (there were more). I pressed commit:
*** IBPP::Exception ***
Message: isc_dsql_fetch failed
SQL Message: -504
From: Michael Hieke <michael.hieke@el...> - 2005-02-23 14:17:46
Milan Babuskov wrote:
> Then I did a SELECT * from even larger table. I scrolled down for 2000+
> records (there were more). I pressed commit:
> *** IBPP::Exception ***
> Context: Statement::Fetch
> Message: isc_dsql_fetch failed
> SQL Message: -504
> Unknown Cursor
Of course, stupid me. If the transaction is no longer active background
fetching needs to be stopped as well. Will commit a fix in a few
From: Michael Hieke <michael.hieke@el...> - 2005-02-23 14:49:41
> Of course, stupid me. If the transaction is no longer active
> background fetching needs to be stopped as well. Will commit a fix
> in a few minutes.
Well, I have committed a preliminary fix for it, but I'm not satisfied.
I had to add calls 
to the SQL frame, because I don't know how to get the information from
the statement that fetching is no longer allowed. Committing the
transaction does free associated cursors, but leaves the statement type
as IBPP::stSelect. There is no access to the private
mResultSetAvailable field. Olivier, what am I overlooking here? Would
mType = IBPP::stUnknown;
to Statement::CursorFree() help?
 To be removed ASAP!
From: Michael Hieke <michael.hieke@el...> - 2005-02-23 15:17:21
Michael Hieke wrote:
> Would adding
> mType = IBPP::stUnknown;
> to Statement::CursorFree() help?
Well, this line seems certainly missing, but the real problem is that
CursorFree() tries to free a handle which was already invalidated by
committing the transaction, so a status vector is returned, an exception
is thrown, and the internal state of the statement is invalid after that.
Olivier, we had a discussion about that in IBPP list already, in March
of last year. I think it's best to modify the code in such a way, that
there is no exception thrown at all whenever the calling code ignores
them anyway by wrapping the called methods in an empty handler. I could
prepare a patch if you like.