PgDAC 6.4.2 procedure parameters issue

Discussion of open issues, suggestions and bugs regarding PgDAC (PostgreSQL Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
AndreyD
Posts: 3
Joined: Fri 13 Dec 2019 11:24

PgDAC 6.4.2 procedure parameters issue

Post by AndreyD » Tue 06 Apr 2021 15:04

TPgSQL does not recognize parameters in procedure calls, i.e:

call somefunction(:param) raises exception "there is no parameter $1".

In the PgDAC 5.3 it worked fine.

PostgreSQL 11.11, Delphi 7.

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

Re: PgDAC 6.4.2 procedure parameters issue

Post by oleg0k » Thu 08 Apr 2021 17:38

Hello,
Unfortunately, we couldn't reproduce the issue.
Please send us an example that uses PgDAC and demonstrates the incorrect behavior, along with DDL scripts for creating and populating the database objects. Please send them through the form on our website: https://devart.com/company/contactform.html

wbr, Oleg
Devart Team

damos
Posts: 14
Joined: Tue 07 Jun 2011 17:04

Re: PgDAC 6.4.2 procedure parameters issue

Post by damos » Wed 04 Aug 2021 09:32

Hi i have the same error when using TPgsSql with simple params like

InsertExternal='insert into fexternals '+
'(labowner,ip,server,analyserid,analysername,isactive,maxracks,startrack,maxrackpos,barcode,path,alerter,labname,tguid)'+
'values (:a,:b,:c,:d,:e,:f,:h,:g,:k,:l,:s,:x,:labname,:tguid)';

AddExternal.sql.text:=InsertExternal;

AddExternal.Params[0].value:=QComports.FieldByName('labowner').value;
AddExternal.Params[1].value:=common.Hostaddress;
AddExternal.Params[2].value:=common.Hostname;
AddExternal.Params[3].value:=QComports.FieldByName('analyserid').value;
AddExternal.Params[4].value:=QComports.FieldByName('analysername').value;
AddExternal.Params[5].value:=QComports.FieldByName('autoopen').value;
AddExternal.Params[6].value:=QComports.FieldByName('maxracks').value;
AddExternal.Params[7].value:=QComports.FieldByName('rackstartnumber').value;
AddExternal.Params[8].value:=QComports.FieldByName('maxrackpositions').value;
AddExternal.Params[9].value:= QComports.FieldByName('barcodepriority').value;
AddExternal.Params[10].value:= '\\'+common.Hostname+'\Data' ;
AddExternal.Params[11].value:=QComports.FieldByName('uploaddata').value;
AddExternal.Params[12].value:= QComports.FieldByName('labname').value;
AddExternal.Params[13].value:=QComports.FieldByName('tguid').value;
try
if not AddExternal.Prepared
then
AddExternal.prepare;

AddExternal.Execute;
except
On E:EXception do
Begin
if E is EdAerror then
errorlb.Caption:='Database error '+E.Message
else
errorlb.Caption:='General error '+E.Message
End;
end;// except

raises exception "there is no parameter $1"
if i replace AddExternal with a TPGQuery with same params values there is no problem
i am using DELPHI XE10.4.2 Sydney, PGdac version 6.4.3 on Windows 10
this was not happen with prior versions like 6.3.1 Delphi XE10.3.3 on Windows 10

evgeniym
Devart Team
Posts: 103
Joined: Thu 13 May 2021 07:08

Re: PgDAC 6.4.2 procedure parameters issue

Post by evgeniym » Thu 05 Aug 2021 04:36

Hi Damos!
Thank you for letting us know!
We have closely checked and unfortunately, we could not reproduce the issue at our end.
Could you please send us a sample which uses PgDAC and demonstrates the incorrect behavior, along with DDL scripts for creating and populating the database objects?
Please send them through the form on our website: https://devart.com/company/contactform.html
Should you have any questions, do not hesitate to ask!
Best regards,
Evgeniy

Post Reply