Subject Re: [IBO] Some errors when using implicit transactions
Author Daniel Rail
Hi,

At November-22-13, 1:22 PM, IBO Support List wrote:

> Daniel,

> Would it be possible for you to provide a little sample app where this issue
> is duplicated?

I'd love to, but I can't reproduce the error myself(and that's running
the same code that my customer is running). At the moment, when a
customer sends me a bug report that pertains to this issue, I proceed
to change the transaction handling from implicit to explicit, and the
error doesn't occur again on my customer's computer. And, it's not
all my customers that are having these problems. Also, we are using
Firebird 2.5.1.

> Thanks,
> Jason
>

> -----Original Message-----
> From: IBObjects@yahoogroups.com [mailto:IBObjects@yahoogroups.com] On Behalf
> Of Daniel Rail
> Sent: Friday, November 22, 2013 6:52 AM
> To: IBObjects
> Subject: [IBO] Some errors when using implicit transactions

> Hi,

> I'm currently using Delphi 7 and the latest IBO 5.

> I have customers that are encountering an exception in areas of the
> application where it is using implicit transactions with AutoCommit :=
> True.

> The exception message is "Activate has already been called.". I do
> notice that it is raised in the TIB_Transaction.Activate method.


> Here's the callstack:

> 00fe581a ibo5crt_d7.bpl Ib_components TIB_Transaction.Activate
> 01007b15 ibo5crt_d7.bpl Ib_components TIB_BDataset.SysPost
> 0154b225 ibo5xrt_d7.bpl Ibodataset TIBOInternalDataset.SysPost
> 00fff592 ibo5crt_d7.bpl Ib_components TIB_Dataset.Post
> 01546310 ibo5xrt_d7.bpl Ibodataset TIBODataset.InternalPost
> 4034f161 dbrtl70.bpl Db TDataSet.CheckOperation
> 4034ec8f dbrtl70.bpl Db TDataSet.Post
> 01542b3a ibo5xrt_d7.bpl Ibodataset TIBODataset.Post
> 0154b245 ibo5xrt_d7.bpl Ibodataset TIBOInternalDataset.SysPost
> 00fe5cd9 ibo5crt_d7.bpl Ib_components
> TIB_Transaction.SysProcessCommitAction
> 00fe6146 ibo5crt_d7.bpl Ib_components TIB_Transaction.SysCommitBegin
> 00fe6cd7 ibo5crt_d7.bpl Ib_components
> TIB_Transaction.SetTransactionState
> 00fe584b ibo5crt_d7.bpl Ib_components TIB_Transaction.Activate
> 01007b15 ibo5crt_d7.bpl Ib_components TIB_BDataset.SysPost
> 0154b225 ibo5xrt_d7.bpl Ibodataset TIBOInternalDataset.SysPost
> 00fff592 ibo5crt_d7.bpl Ib_components TIB_Dataset.Post
> 01546310 ibo5xrt_d7.bpl Ibodataset TIBODataset.InternalPost
> 4034f161 dbrtl70.bpl Db TDataSet.CheckOperation
> 4034ec8f dbrtl70.bpl Db TDataSet.Post
> 01542b3a ibo5xrt_d7.bpl Ibodataset TIBODataset.Post
> 160eba80 SLibCMS1500ClaimForm.spi
> SLibCMS1500ClaimForm_CMS1500ClaimFormFRM
> 876 TCMS1500ClaimFormFRM.SaveExecute

> The last line in the callstack corresponds to a TIBOQuery.Post

> I checked the code in IBO 4, just to compare both versions of the
> TIB_Transaction.Activate method, and I noticed that the raising of
> that exception("Activate has already been called.") is new in IBO 5.
> What would be the consequence of changing the code to simply skip the
> code(in the Activate method) if FActivateIsHappening = True ?

> One thing that I'm noticing in the callstack is that the
> TIBODataset.Post method is called twice and the
> TIBODataset.InternalPost method is called three times.

> The exception is not raised everytime, but my customers are reporting
> it in different areas of our applications, and it's never consistent.
> I noticed that if I change from implicit to explicit transaction
> handling, the error goes away. But, having to make changes in over
> 500 forms, is not the best solution at the moment.

> Any help is appreciated.

> Daniel Rail
> Senior System Engineer
> ACCRA Group Inc. (www.accra.ca)
> ACCRA Med Software Inc. (www.accramed.ca)



> ------------------------------------




--
Best regards,
Daniel Rail
Senior Software Developer
ACCRA Solutions Inc. (www.accra.ca)
ACCRA Med Software Inc. (www.filopto.com)