Subject | Re: [IBO] CloseWithConfirm Problem |
---|---|
Author | Jason Wharton |
Post date | 2002-04-19T04:55:46Z |
InTransaction is only true if somewhere the StartTransaction method is
called. I don't call it anywhere in the IBO engine code so that explains why
it is false.
As for where the insert is coming from, I recommend you do a debug session
and get the callstack. Set a breakpoint somewhere in code, like a
BeforeExecute event or something to capture it. Then, look at the callstack
to see what sequence of events and calls are leading up to the mystery
insert. That too would have to be coming from your code somewhere since I
don't do that automatically anywhere either.
HTH,
Jason Wharton
CPS - Mesa AZ
http://www.ibobjects.com
called. I don't call it anywhere in the IBO engine code so that explains why
it is false.
As for where the insert is coming from, I recommend you do a debug session
and get the callstack. Set a breakpoint somewhere in code, like a
BeforeExecute event or something to capture it. Then, look at the callstack
to see what sequence of events and calls are leading up to the mystery
insert. That too would have to be coming from your code somewhere since I
don't do that automatically anywhere either.
HTH,
Jason Wharton
CPS - Mesa AZ
http://www.ibobjects.com
----- Original Message -----
From: "ehandbury" <ehandbury@...>
To: <IBObjects@yahoogroups.com>
Sent: Thursday, April 18, 2002 8:41 PM
Subject: [IBO] CloseWithConfirm Problem
> Hello,
>
> (IBO4.2Gc, BCB4, FB-1.0-796)
>
> I have a problem... Steps:
> 1) Show my main Client form which opens a # of TIB_Querys.
> 2) Press a button to close it without doing anything.
> 3) OnFormClose event fires where I have the following code:
> IB_Monitor1->Enabled = true;
> if (trClient->CloseWithConfirm() == 2)
> Action = caNone;
> IB_Monitor1->Enabled = false;
>
> I check trClient->InTRansaction before the CloseWithConfirm call
> and its false. When I step into the CloseWithConfirm call, my
> TIB_TransactionBar lights up and I get the following output in the
> OnMonitorOutputItem event:
>
> { "/*---\r\n
> PREPARE STATEMENT\r\n
> TR_HANDLE = 15997200\r\n
> STMT_HANDLE = 16005784\r\n
> \r\n
> INSERT INTO MBCLIENT VALUES(? /* CLIENTKEY */ ,? /* FILENUM
> */ ,'now','now',? /* NOTES */ );\r\n
> \r\n
> FIELDS = [ Version 1 SQLd 12 SQLn 30\r\n
> MBPRODUCTITEM.DESCRIPTION[PDESC] = <NIL>\r\n
> MBPROVIDERITEM.NAME[LNAME] = <NIL>\r\n
> MBPRODUCT.PRODUCTKEY = <NIL>\r\n
> MBPRODUCT.PRODUCTITEMKEY = <NIL>\r\n
> MBPRODUCT.REFNUM = <NIL>\r\n
> MBPRODUCT.STATUS = <NIL>\r\n
> MBPRODUCT.LOANAMOUNT = <NIL>\r\n
> MBPRODUCT.BALANCE = <NIL>\r\n
> MBPRODUCT.INTERESTONLY = <NIL>\r\n
> MBPRODUCTITEM.PROVIDERITEMKEY = <NIL>\r\n
> MBPRODUCT.SETTLEDDATE = <NIL>\r\n
> MBPRODUCT.CLOSEDDATE = <NIL> ]\r\n
> \r\n
> ERRCODE = 335544569\r\n
> ----*/" }
>
> ...And then my program blows up. What I can't understand is why the
> Insert statement is being generated? I didn't do anything to the
> datasets and InTransaction was false before the CloseWithConfoirm
> call.
>
> Thanks for any help. Eric.
>