Subject | Re: [IBO] Some errors when using implicit transactions |
---|---|
Author | Daniel Rail |
Post date | 2013-11-22T18:25:57Z |
Hi,
At November-22-13, 1:09 PM, IBO Support List wrote:
What happens when there are more than one dataset(TIBOQuery in my
case) that is associated with the same TIB_Transaction(which has
AutoCommit:=True and AutoCommitRetaining:=False) and that both
datasets are in Edit mode, and the Post of on of them is called?
Is it possible that it is trying to also Post the other dataset that
is in Edit mode, and that might be triggering the race condition?
Best regards,
Daniel Rail
Senior Software Developer
ACCRA Solutions Inc. (www.accra.ca)
ACCRA Med Software Inc. (www.filopto.com)
At November-22-13, 1:09 PM, IBO Support List wrote:
> Daniel,I'm simply thinking here.
> It looks as if it is having a race condition. Is that the same dataset Post
> is being called on?
What happens when there are more than one dataset(TIBOQuery in my
case) that is associated with the same TIB_Transaction(which has
AutoCommit:=True and AutoCommitRetaining:=False) and that both
datasets are in Edit mode, and the Post of on of them is called?
Is it possible that it is trying to also Post the other dataset that
is in Edit mode, and that might be triggering the race condition?
> 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)