Subject R: [IBO] IBO 4.9.8 - TIB_Cursor bug with pessimistic lock?
Author Enrico Raviglione
Hi Jason,

i sended at your private email an example and the exception.

Best regards,

Enrico Raviglione



Da: IBObjects@yahoogroups.com [mailto:IBObjects@yahoogroups.com] Per conto di Jason Wharton
Inviato: giovedì 7 gennaio 2010 19:01
A: IBObjects@yahoogroups.com
Oggetto: Re: [IBO] IBO 4.9.8 - TIB_Cursor bug with pessimistic lock?





I wrote a quick test in Delphi 2010 with the latest IBO 4.9.8 and it works
flawlessly.

Here is the code:

IB_Cursor1.SQL.Text := 'select * from fts$_IND for update';
IB_Cursor1.PessimisticLocking := true;
IB_Cursor1.First;
IB_Cursor1.Edit;
IB_Cursor1.Cancel;

Here is the SQL Monitor trace:

/*---

CLOSE CURSOR

STMT_HANDLE = 2

----*/

/*---

PREPARE STATEMENT

TR_HANDLE = 4

STMT_HANDLE = 2

select * from fts$_IND for update

PLAN (FTS$_IND NATURAL)

FIELDS = [ Version 1 SQLd 21 SQLn 30

FTS$_IND.FTS$IND_NME = <NIL>

FTS$_IND.FTS$TBL_NME = <NIL>

FTS$_IND.FTS$KEY_COL = <NIL>

FTS$_IND.FTS$AUX_COL = <NIL>

FTS$_IND.FTS$SCH_COL = <NIL>

FTS$_IND.FTS$SCH_LEN = <NIL>

FTS$_IND.FTS$WRD_LEN = <NIL>

FTS$_IND.FTS$USR_LEN = <NIL>

FTS$_IND.FTS$MIN_LEN = <NIL>

FTS$_IND.FTS$KEY_DM = <NIL>

FTS$_IND.FTS$KEY_TYP = <NIL>

FTS$_IND.FTS$KEY_IND = <NIL>

FTS$_IND.FTS$WDS_TYP = <NIL>

FTS$_IND.FTS$STATUS = <NIL>

FTS$_IND.FTS$LOG = <NIL>

FTS$_IND.FTS$SOUNDEX = <NIL>

FTS$_IND.FTS$SNDXMAX = <NIL>

FTS$_IND.FTS$METAPHN = <NIL>

FTS$_IND.FTS$SYNONYM = <NIL>

FTS$_IND.FTS$ANTONYM = <NIL>

FTS$_IND.FTS$COND_EXPR = <NIL> ]

SECONDS = 0.016

----*/

/*---

STATEMENT INFO

STMT_HANDLE = 2

----*/

/*---

EXECUTE STATEMENT

TR_HANDLE = 4

STMT_HANDLE = 2

PARAMS = [ ]

----*/

/*---

OPEN CURSOR

STMT_HANDLE = 2

NAME = C166552644680354

SECONDS = 0.016

----*/

/*---

PREPARE STATEMENT

TR_HANDLE = 4

STMT_HANDLE = 5

UPDATE FTS$_IND FTS$_IND SET FTS$_IND.FTS$IND_NME = FTS$_IND.FTS$IND_NME

WHERE CURRENT OF C166552644680354

PLAN (FTS$_IND INDEX ())

FIELDS = [ Version 1 SQLd 0 SQLn 30 ]

----*/

/*---

STATEMENT INFO

STMT_HANDLE = 5

----*/

/*---

EXECUTE STATEMENT

TR_HANDLE = 4

STMT_HANDLE = 5

PARAMS = [ ]

SELECT COUNT: 1

UPDATE COUNT: 1

----*/

/*---

ROLLBACK RETAINING

TR_HANDLE = 4

----*/

----- Original Message -----
From: "Enrico Raviglione" <e.raviglione@... <mailto:e.raviglione%40ideasistemi.it> >
To: <IBObjects@yahoogroups.com <mailto:IBObjects%40yahoogroups.com> >
Sent: Thursday, January 07, 2010 9:19 AM
Subject: [IBO] IBO 4.9.8 - TIB_Cursor bug with pessimistic lock?

Sorry for my previous dirty email...

Hi Jason,

please verify TIB_Cursor with pessimistic lock because when i call Edit()
application hang with an exception.

TIB_Cursor SemaforoC SQL: Select KEYTABLE1, USER From SEMAFORO;

Code :

SefamoroC.Prepare();

SemaforoC.First();

SemaforoC.Edit(); ç Here application does an exception

The same code work properly if i using a TIBOQuery instead of TIB_Cursor.

Best regards,

Enrico Raviglione.



Nessun virus nel messaggio in arrivo.
Controllato da AVG - www.avg.com
Versione: 9.0.725 / Database dei virus: 270.14.126/2601 - Data di rilascio: 01/07/10 08:35:00



[Non-text portions of this message have been removed]