ibcstoredprocedure return value problem

Discussion of open issues, suggestions and bugs regarding IBDAC (InterBase Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
JACEKJC
Posts: 1
Joined: Fri 08 Dec 2017 15:41

ibcstoredprocedure return value problem

Post by JACEKJC » Fri 08 Dec 2017 15:44

It's my stored proceduee
create or alter procedure SPRPIT11 (
ROK integer,
IDOSOBY integer)
returns (
WYNIK integer)
as
begin
/* Procedure Text
select sum(wartosc) as wynik from pozycjelist
join skl_pit on pozycjelist.numer=skl_pit.numer
where extract(year from datapodatek)=:rok and skl_pit.p11>0 and id_osoby=:idosoby
into :wynik;
suspend;
end^

SET TERM ; ^


in delphi
TR := TIBcTransaction.Create(NIL);
TR.DefaultConnection := Dane.Baza;
Tr.StartTransaction;

Skl := TIBCStoredProc. Create( nil );
Skl.Connection := Dane.Baza;
Skl.Transaction := Tr;
SKL.StoredProcName:='SPRPIT11';
SKL.Params.ParamByName('ROK').AsInteger := Rok;
SKL.Params.ParamByName('IDOSOBY').AsInteger := idOSOBy;
SKL.ExecProc;
Result:=SKL.ParamByName('WYNIK').AsFloat; - at this place I hav error.
What's wrong?

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

Re: ibcstoredprocedure return value problem

Post by ViktorV » Fri 08 Dec 2017 16:15

Unfortunately we could not reproduce the issue on the latest IBDAC 6.1.4 version.
Please check whether the problem occurs on the latest version IBDAC 6.1.4 and inform us about the result. It it is, 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.

Post Reply