Subject Re: [IBO] about selectable SPs
Author Jason Wharton
Just use Locate().

Jason Wharton
CPS - Mesa AZ
http://www.ibobjects.com

-- We may not have it all together --
-- But together we have it all --


----- Original Message -----
From: "duilio_fos" <irel_llc@...>
To: <IBObjects@yahoogroups.com>
Sent: Friday, October 18, 2002 4:55 AM
Subject: [IBO] about selectable SPs


> I use IBO3 with D3.
>
> I have a SSP that works like this:
>
> select * from mySSP('01','2002-10-18')
>
> and I call it with the following code:
>
> with TIBOQuery.Create(nil)
> try
> SQL.Add('select * from mySSP(:cod_mag,:dat_fin)');
> Prepare;
> ParamByName('cod_mag').AsString:=CodMag;
> ParamByName('dat_fin').AsDateTime:=DFin;
> Open;
> First;
> ...
>
> finally
> Free;
> end;
>
> The problem is: I find I cannot _search_ the TDataset.
>
> If I try to do so, using the code
>
> SetKey;
> FieldByName(...)...
> Gotonearest:
>
> I get the error message: "variant array index out of bonds".
>
> Is there any workaround ?
>
> TIA
>
> Duilio Foschi