Subject | RE: [IBO] TIB_Cursor - Cursor is not open Exception |
---|---|
Author | IBO Support List |
Post date | 2014-10-18T21:03:01Z |
Luiz,
I consider the behavior in IBO 4.x to be incorrect.
The First method strictly implies that you want to fetch records from a
cursor.
It should raise an exception if there isn't any dataset.
If you have a large application that depends upon this old behavior, perhaps
you can consider making your own sub-class and override it to have the
proper behaviour you are expecting. Let me know if you need some help to
accomplish this.
Kind regards,
Jason Wharton
www.ibobjects.com
-----Original Message-----
From: IBObjects@yahoogroups.com [mailto:IBObjects@yahoogroups.com]
Sent: Saturday, October 18, 2014 12:32 PM
To: IBObjects@yahoogroups.com
Subject: [IBO] TIB_Cursor - Cursor is not open Exception
Hi Jason,
In IBO 4.X, I was using the next code with TIB_CURSOR to delete a record
from a table and it was working well, but with IBO 5.5.3 EVALUATION version
I have an exception: "Cursor is not open".
If I change "First" to:
Execute; Or
Prepare;
Open;
Then, all works well.
I know is better I use tib_dsql to do it, but
I´d like to know if this is normal or a bug.
Here is a snippet of my code:
cr_config:TIB_Cursor;
with cr_config,cr_config.sql do begin
if active then close;
Clear;
add('delete from UsuLogTime A where A.nh_login='+quotedstr(ll)+' and
A.nh_senha='+quotedstr(ss));
add('and A.nh_isnh=1');
first; --> EXCEPTION "Cursor is not open", if change to Execute or
"Prepare;Open" all is ok
unprepare;
close;
end;
Regards,
Luiz
------------------------------------
Posted by: "Luiz" <cprmlao@...>
------------------------------------
___________________________________________________________________________
IB Objects - direct, complete, custom connectivity to Firebird or InterBase
without the need for BDE, ODBC or any other layer.
___________________________________________________________________________
http://www.ibobjects.com - your IBO community resource for Tech Info papers,
keyword-searchable FAQ, community code contributions and more !
http://tracker.ibobjects.com - your portal to submit and monitor bug reports
http://community.ibobjects.com - your portal to purchase and upgrade
------------------------------------
Yahoo Groups Links
I consider the behavior in IBO 4.x to be incorrect.
The First method strictly implies that you want to fetch records from a
cursor.
It should raise an exception if there isn't any dataset.
If you have a large application that depends upon this old behavior, perhaps
you can consider making your own sub-class and override it to have the
proper behaviour you are expecting. Let me know if you need some help to
accomplish this.
Kind regards,
Jason Wharton
www.ibobjects.com
-----Original Message-----
From: IBObjects@yahoogroups.com [mailto:IBObjects@yahoogroups.com]
Sent: Saturday, October 18, 2014 12:32 PM
To: IBObjects@yahoogroups.com
Subject: [IBO] TIB_Cursor - Cursor is not open Exception
Hi Jason,
In IBO 4.X, I was using the next code with TIB_CURSOR to delete a record
from a table and it was working well, but with IBO 5.5.3 EVALUATION version
I have an exception: "Cursor is not open".
If I change "First" to:
Execute; Or
Prepare;
Open;
Then, all works well.
I know is better I use tib_dsql to do it, but
I´d like to know if this is normal or a bug.
Here is a snippet of my code:
cr_config:TIB_Cursor;
with cr_config,cr_config.sql do begin
if active then close;
Clear;
add('delete from UsuLogTime A where A.nh_login='+quotedstr(ll)+' and
A.nh_senha='+quotedstr(ss));
add('and A.nh_isnh=1');
first; --> EXCEPTION "Cursor is not open", if change to Execute or
"Prepare;Open" all is ok
unprepare;
close;
end;
Regards,
Luiz
------------------------------------
Posted by: "Luiz" <cprmlao@...>
------------------------------------
___________________________________________________________________________
IB Objects - direct, complete, custom connectivity to Firebird or InterBase
without the need for BDE, ODBC or any other layer.
___________________________________________________________________________
http://www.ibobjects.com - your IBO community resource for Tech Info papers,
keyword-searchable FAQ, community code contributions and more !
http://tracker.ibobjects.com - your portal to submit and monitor bug reports
http://community.ibobjects.com - your portal to purchase and upgrade
------------------------------------
Yahoo Groups Links