Subject | Re: [IBO] How getting Results from StoredProcedure |
---|---|
Author | Luiz Alves |
Post date | 2002-01-18T14:03:41Z |
Gerhard,
1. I would add SUSPEND in your code.
....
....
MyCursor: SQL: 'select RES_CODE from INV_IN(?INV_IN)'
and the delphi code:
function TForm1.recall_value:string
begin
With MyCursor do begin
if not prepared then prepare;
parambyname('INV_IN').asString:='your_string';
first;
if not eof then
result:=fieldbyname('RES_CODE').asString
else result:='';
end
end;
Usually, I avoid tib_storedproc and use tib_cursor, tiq_query .... after
add suspend in SP.
Luiz.
> The RES_CODE will return (testet), butI would did the next:
> how can I get this RES-CODE value in my application?
1. I would add SUSPEND in your code.
....
....
> beginSUSPEND; /*Add*/
> RES_CODE = "1";
> end
> END;2. Next, I would use a tib_cursor as:
MyCursor: SQL: 'select RES_CODE from INV_IN(?INV_IN)'
and the delphi code:
function TForm1.recall_value:string
begin
With MyCursor do begin
if not prepared then prepare;
parambyname('INV_IN').asString:='your_string';
first;
if not eof then
result:=fieldbyname('RES_CODE').asString
else result:='';
end
end;
Usually, I avoid tib_storedproc and use tib_cursor, tiq_query .... after
add suspend in SP.
Luiz.