TIBCStoredProc problem
Posted: Thu 14 Apr 2011 03:18
Hi,
Using Delphi 2010, Firebird database, latest version IBDAC.
Have just converted a project from IBX to IBDAC and am having trouble with the IBDAC Stored Procedure component.
There is a procedure in the firebird database that returns the number of sales between two dates. With IBX I had their stored procedure component and called it like this:
function TStockData.Get_ContractSales(FromDate, ToDate: tDate;
SCode: integer): integer;
begin
with V2StoredProc do
begin
StoredProcName := 'GET_CONTRACT_SALES';
ParamByName('START_DATE').asDate := FromDate;
ParamByName('SALE_DATE').asDate := ToDate;
ParamByName('SITE_CODE').asInteger := SCode;
Prepare;
ExecProc;
Result := ParamByName('CONTRACT_SALES').asInteger;
end;
end;
Never had any problems with this using the IBX component and used the same component to call other procedures that are in the database.
Now with IBDAC.....I keep getting this error
Probably something simple that I am missing but can someone please tell me what I am doing wrong in relation to the IBDAC component.
regards
Bill
Using Delphi 2010, Firebird database, latest version IBDAC.
Have just converted a project from IBX to IBDAC and am having trouble with the IBDAC Stored Procedure component.
There is a procedure in the firebird database that returns the number of sales between two dates. With IBX I had their stored procedure component and called it like this:
function TStockData.Get_ContractSales(FromDate, ToDate: tDate;
SCode: integer): integer;
begin
with V2StoredProc do
begin
StoredProcName := 'GET_CONTRACT_SALES';
ParamByName('START_DATE').asDate := FromDate;
ParamByName('SALE_DATE').asDate := ToDate;
ParamByName('SITE_CODE').asInteger := SCode;
Prepare;
ExecProc;
Result := ParamByName('CONTRACT_SALES').asInteger;
end;
end;
Never had any problems with this using the IBX component and used the same component to call other procedures that are in the database.
Now with IBDAC.....I keep getting this error
....parameter START_DATE not found
Probably something simple that I am missing but can someone please tell me what I am doing wrong in relation to the IBDAC component.
regards
Bill