Subject | RES: [IBO] TIB_Cursor - Cursor is not open Exception |
---|---|
Author | Luiz |
Post date | 2014-10-19T03:52:55Z |
Hi,
I am now renew my subscription to source code.
But, I am getting randomic AV with tib_grid.
I have several modal forms. I open a form with tib_grid and all is ok.
I open another and also is ok. Then, I continue opening others forms and the
error occurs.
If you can help me with this I will appreciate.
I can´t get a call stack when the AV happens.
Regards,
Luiz
.
De: IBObjects@yahoogroups.com [mailto:IBObjects@yahoogroups.com]
Enviada em: sábado, 18 de outubro de 2014 18:03
Para: IBObjects@yahoogroups.com
Assunto: RE: [IBO] TIB_Cursor - Cursor is not open Exception
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 am now renew my subscription to source code.
But, I am getting randomic AV with tib_grid.
I have several modal forms. I open a form with tib_grid and all is ok.
I open another and also is ok. Then, I continue opening others forms and the
error occurs.
If you can help me with this I will appreciate.
I can´t get a call stack when the AV happens.
Regards,
Luiz
.
De: IBObjects@yahoogroups.com [mailto:IBObjects@yahoogroups.com]
Enviada em: sábado, 18 de outubro de 2014 18:03
Para: IBObjects@yahoogroups.com
Assunto: RE: [IBO] TIB_Cursor - Cursor is not open Exception
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