TIBCStoredProc doesnt pass string parameters

Discussion of open issues, suggestions and bugs regarding IBDAC (InterBase Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
alfonsopresa
Posts: 7
Joined: Sat 25 Nov 2017 16:56

TIBCStoredProc doesnt pass string parameters

Post by alfonsopresa » Tue 02 Jan 2018 17:45

Hi, I'm trying to pass string parameters to an TIBCStoredProc this way:
SPRecepAdd.Close;
SPRecepAdd.ParamByName('ID_CR').AsLargeInt := tRecID.Value;
SPRecepAdd.ParamByName('BARCODE').AsString := '12345';
SPRecepAdd.ExecProc;

The parameter Barcode is passed as null to the stored proc.

Delphi 10.2.2 Tokyo and IBDac 6.14

Plese any help will be appreciated.

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

Re: TIBCStoredProc doesnt pass string parameters

Post by ViktorV » Wed 03 Jan 2018 09:33

Unfortunately we could not reproduce the issue on the latest IBDAC 6.1.4 version.
Please compose a full sample demonstrating the described behavior and send it to us via e-support form: https://www.devart.com/company/contactform.html, including scripts for creating database objects.

alfonsopresa
Posts: 7
Joined: Sat 25 Nov 2017 16:56

Re: TIBCStoredProc doesnt pass string parameters

Post by alfonsopresa » Thu 04 Jan 2018 02:11

Hi Victor, can we do a Teamviewer session? If I'm wrong I'll pay your hour if not you'll give me 3 years updates free lol.
create or alter procedure SP_COMPRAS_RECEPCION_ADD (
BARCODE varchar(200))
as
begin
if (:BARCODE is null) then exception E_MY_BARCODE 'BARCODE DOESNT EXIST';
end
SPRecepAdd.Close;
SPRecepAdd.ParamByName('BARCODE').AsString := aBarcode;
SPRecepAdd.ExecProc;

This is the code.
Tokio 10.2.2 FB 3.0.2

Thanks in davance,

alfonsopresa
Posts: 7
Joined: Sat 25 Nov 2017 16:56

Re: TIBCStoredProc doesnt pass string parameters

Post by alfonsopresa » Thu 04 Jan 2018 06:04

Actually TIBCSQL has the same issue and the issue is related to DescribeParams property. If it is active string params become null before reaching the store procedure.
BTW If you put a monitor in the middle the monitor shows the params correctly.

Thanks in advance,

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

Re: TIBCStoredProc doesnt pass string parameters

Post by ViktorV » Thu 04 Jan 2018 13:38

Thank you for the information. We will investigate this IBDAC behavior and will tell you the result.
To solve the task, please try setting the TIBCStoredProc.AutoPrepare property to True.

alfonsopresa
Posts: 7
Joined: Sat 25 Nov 2017 16:56

Re: TIBCStoredProc doesnt pass string parameters

Post by alfonsopresa » Thu 04 Jan 2018 16:57

Hi Victor, it works but what's the relation between auroprepare and string and only string parameters? Is this a bug? If so when would it be solved? Regards,

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

Re: TIBCStoredProc doesnt pass string parameters

Post by ViktorV » Fri 05 Jan 2018 10:53

We will continue investigation of the IBDAC behavior and inform you as soon as we get any results.

alfonsopresa
Posts: 7
Joined: Sat 25 Nov 2017 16:56

Re: TIBCStoredProc doesnt pass string parameters

Post by alfonsopresa » Sun 14 Jan 2018 08:03

Any result?

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

Re: TIBCStoredProc doesnt pass string parameters

Post by ViktorV » Mon 15 Jan 2018 13:18

We have already fixed the issue. This fix will be included in the next build of IBDAC which we are planning to release this week.

Post Reply