Assertion failure in CRAccess.pas

Discussion of open issues, suggestions and bugs regarding SDAC (SQL Server Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
mscrocdile
Posts: 1
Joined: Thu 06 Aug 2020 11:04

Assertion failure in CRAccess.pas

Post by mscrocdile » Thu 06 Aug 2020 11:17

Hello,
using SDAC 9.2.4 i got Assertion failure (d:\Projects\Delphi\Dac\Common\Source\CRAccess.pas, line 7453)
Using SDAC 8.2.8 it's ok yet.

Code:

procedure TForm1.DoIt;
var
FCommand: TCustomDADataset;
Param: TMSParam;
begin
FCommand := msconnection1.CreateDataSet;
try
FCommand.ParamCheck := false;
FCommand.SQL.Text := 'select :P';
param := FCommand.Params.ItemClass.Create(nil) as TMSParam;
param.DataType := ftInteger;
param.Value := 1;
FCommand.Params.AddParam(param);
FCommand.Execute;
finally
FCommand.Free;
end;
end;

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

Re: Assertion failure in CRAccess.pas

Post by ViktorV » Tue 11 Aug 2020 15:31

Thank you for the information. The issue and investigation is in progress. We will inform you when we have any results.
To solve the issue, you can add the line

Code: Select all

   Param.Name: = 'P';
before the line

Code: Select all

   FCommand.Params.AddParam (param);

Stellar
Devart Team
Posts: 496
Joined: Tue 03 Oct 2017 11:00

Re: Assertion failure in CRAccess.pas

Post by Stellar » Thu 27 Aug 2020 12:41

Thank you for the information.
We have fixed the issue, and the fix will be included in the next SDAC build.

Post Reply