TIBCStoredProc doesnt pass string parameters
-
- Posts: 7
- Joined: Sat 25 Nov 2017 16:56
TIBCStoredProc doesnt pass string parameters
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.
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.
Re: TIBCStoredProc doesnt pass string parameters
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.
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.
-
- Posts: 7
- Joined: Sat 25 Nov 2017 16:56
Re: TIBCStoredProc doesnt pass string parameters
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.
SPRecepAdd.ParamByName('BARCODE').AsString := aBarcode;
SPRecepAdd.ExecProc;
This is the code.
Tokio 10.2.2 FB 3.0.2
Thanks in davance,
SPRecepAdd.Close;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.ParamByName('BARCODE').AsString := aBarcode;
SPRecepAdd.ExecProc;
This is the code.
Tokio 10.2.2 FB 3.0.2
Thanks in davance,
-
- Posts: 7
- Joined: Sat 25 Nov 2017 16:56
Re: TIBCStoredProc doesnt pass string parameters
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,
BTW If you put a monitor in the middle the monitor shows the params correctly.
Thanks in advance,
Re: TIBCStoredProc doesnt pass string parameters
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.
To solve the task, please try setting the TIBCStoredProc.AutoPrepare property to True.
-
- Posts: 7
- Joined: Sat 25 Nov 2017 16:56
Re: TIBCStoredProc doesnt pass string parameters
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,
Re: TIBCStoredProc doesnt pass string parameters
We will continue investigation of the IBDAC behavior and inform you as soon as we get any results.
-
- Posts: 7
- Joined: Sat 25 Nov 2017 16:56
Re: TIBCStoredProc doesnt pass string parameters
Any result?
Re: TIBCStoredProc doesnt pass string parameters
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.