IBDAC Version 7.4.1 - Invalid Transaction handling

Discussion of open issues, suggestions and bugs regarding IBDAC (InterBase Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
AsterixBT
Posts: 11
Joined: Fri 17 Mar 2017 09:50

IBDAC Version 7.4.1 - Invalid Transaction handling

Post by AsterixBT » Tue 23 Mar 2021 13:45

Hello,
we have been using IBDAC for several years in our Delphi projects (Delphi 10.4.2).
In the previous version 7.3.2 everything worked without problems.
In the same project with the latest IBDAC version 7.4.1, when running the same TIBCStoredProc several times, an error message occurs:

Im Projekt AvERP.exe ist eine Exception der Klasse EIBCError mit der Meldung 'invalid transaction handle (expecting explicit transaction start)' aufgetreten.

The only thing that has obviously changed in the two versions mentioned is the new property: "SSLOptions" in TIBCConnection, but this defaults to Enable := false.
Does IBDAC now work with threads?
That would explain the problem, but not how to solve it.

We are working with 3 different transaction components TIBCTransaction on a single TIBCConnection to request the read only database operations.

As said, the Delphi source code is the same, only the IBDAC version has changed.

Does anyone have a solution to the problem.

Best regards from Germany

oleg0k
Devart Team
Posts: 190
Joined: Wed 11 Mar 2020 08:28

Re: IBDAC Version 7.4.1 - Invalid Transaction handling

Post by oleg0k » Thu 25 Mar 2021 19:44

Hello,
Unfortunately, the information you provided is insufficient for us to reproduce the issue.
Please send us an example that uses IBDAC and demonstrates the incorrect behavior, along with DDL scripts for creating and populating the database objects (or the backup file/database file), using the form: https://devart.com/company/contactform.html

wbr, Oleg
Devart Team

AsterixBT
Posts: 11
Joined: Fri 17 Mar 2017 09:50

Re: IBDAC Version 7.4.1 - Invalid Transaction handling

Post by AsterixBT » Mon 29 Mar 2021 10:12

Hello,

I have sent them the requested things to reproduce the error via the contact form last Friday, 26.03.2021.

Best regards from Germany

oleg0k
Devart Team
Posts: 190
Joined: Wed 11 Mar 2020 08:28

Re: IBDAC Version 7.4.1 - Invalid Transaction handling

Post by oleg0k » Wed 31 Mar 2021 15:46

Hello,
We've received your demo project and started investigating the issue. It may take a few days.

wbr, Oleg
Devart Team

AsterixBT
Posts: 11
Joined: Fri 17 Mar 2017 09:50

Re: IBDAC Version 7.4.1 - Invalid Transaction handling

Post by AsterixBT » Thu 08 Apr 2021 09:03

Hello,

this morning in Delphi came the message that there is a new version 7.4.3 from 6 April 2021. In the history it says that the bug with BLOB parameter is fixed. So I installed this version.
Unfortunately the problem still exists with the transaction with blob fields. You can still try it with the same example I sent them on 26/03/2021.

I hope you will find a solution here quickly.
Thanks in advance.

Best regards
from Germany

AsterixBT
Posts: 11
Joined: Fri 17 Mar 2017 09:50

Re: IBDAC Version 7.4.1 - Invalid Transaction handling

Post by AsterixBT » Thu 08 Apr 2021 12:42

Hello,

maybe I can contribute something to solve the problem faster.
Reference to the example I sent you from 26/03/2021, in which the error can be reproduced well.

The error occurs from the second call of the procedure, after a commit was made on the first run, so that a new Firebird transaction number is generated.
If after the unprepare still this line:
IBCStoredProc1.StoredProcName := '';
is added, then there will be no more error message.
I.e. the transaction number will be generated with the assignment: StoredProcName := ... and as long as the procedure name remains the same, no new transaction trade will be generated if the output parameter is exclusively a BLOB parameter.

It can't be the solution, because the transaction is connected with very many TIBCStoredProc and TIBCQuery , but maybe it makes the debugging easier.


procedure TForm1.RunProc;
var
oProc : TIBCStoredProc;
s1 : string;
begin
oProc := IBCStoredProc1;
oProc.StoredProcName := 'P_TEST';
oProc.Prepare;
oProc.ParamByName('MYID').AsInteger := 1;
oProc.Execute;
s1 := oProc.ParamByName('TESTVALUE').AsString;
end;

procedure TForm1.Button2Click(Sender: TObject);
var
iCounter : integer;
begin
iCounter := 0;

while iCounter <= 100 do
begin
inc(iCounter);
IBCStoredProc1.unprepare;

// If this line is inserted, it works. But it is not the solution.
IBCStoredProc1.StoredProcName := '';

RunProc;
if IBCTransPascalScript.active then
IBCTransPascalScript.Commit;
end;
end;

Best regards
from Germany

oleg0k
Devart Team
Posts: 190
Joined: Wed 11 Mar 2020 08:28

Re: IBDAC Version 7.4.1 - Invalid Transaction handling

Post by oleg0k » Fri 09 Apr 2021 11:41

Hello,
Thank you for the information. We've reproduced the issue and are currently working to resolve it. We'll keep you updated on the progress.

wbr, Oleg
Devart Team

ViktorV
Devart Team
Posts: 3168
Joined: Wed 30 Jul 2014 07:16

Re: IBDAC Version 7.4.1 - Invalid Transaction handling

Post by ViktorV » Wed 05 May 2021 15:02

Hi Gerd,

Thanks for your patience on this request.
Kindly note that we were able to fix the issue and it will be added to the next release for IBDAC.

Best regards,
Viktor

Post Reply