TPB constant error

Discussion of open issues, suggestions and bugs regarding IBDAC (InterBase Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
Tsagoth
Posts: 33
Joined: Wed 15 Jul 2009 01:25

TPB constant error

Post by Tsagoth » Tue 09 Jun 2020 20:44

IBCTransaction in the parameter strings does not accept snapshot. In fact it doesn't accept hardly any pf the Interbase options, read, write and wait are all it takes. Devart has used custom names like concurrency or read_comitted. Why don't you guys use the real names ? What do concurrency or consistency even mean, it's not documented anywhere what parms are valid in the Params stringlist.

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

Re: TPB constant error

Post by oleg0k » Tue 16 Jun 2020 09:12

Hello,
IBDAC offers several predefined isolation levels in TIBCIsolationLevel for the convenience of the developer: (https://www.devart.com/ibdac/docs/devar ... nlevel.htm), which are then translated to transaction parameters. To set the isolation level to snapshot, set the IsolationLevel property to iblSnapshot.
If you want to define isolation parameters yourself, set the property to iblCustom and follow the API Guide to define parameters ( http://docwiki.embarcadero.com/images/I ... IGuide.pdf ).
Our constants fully correspond those in the guide.
The short variant without the isc_tpb_ prefix is also allowed, e.g. read_committed rather than isc_tpb_read_committed.

wbr, Oleg
Devart Team

Tsagoth
Posts: 33
Joined: Wed 15 Jul 2009 01:25

Re: TPB constant error

Post by Tsagoth » Wed 01 Jul 2020 19:43

That isn't true though. Setting iblSnapshot sets the NOWAIT option. I want to use WAIT so I must use iblCustom, which is fine. The interbase Language Reference specifies that SNAPSHOT is the valid IsolationLevel parameter to use. IBDAC dos not allow that keyword. That API guide is for use with C++, but I am using Delphi. I would expect IBDAC to use what the Language Reference says are the valid keywords.

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

Re: TPB constant error

Post by oleg0k » Wed 08 Jul 2020 11:30

Hello,
Thank you for the information. We've reproduced the issue. Currently the SNAPSHOT isolation level in our components is defined by a combination of concurrency and nowait parameters. We've found a solution by setting the isolation level to Custom and specifying a suitable combination of parameters.
See the chapter "1.2. Creating a Transaction Parameter Buffer" in the API guide for a list of constants that can be specified as transaction parameters: http://docwiki.embarcadero.com/images/I ... IGuide.pdf . We'll fix the issue with the SNAPSHOT isolation level in future builds of IBDAC.

wbr, Oleg
Devart Team

Post Reply