Subject | Re: [IBO] Execute Block , help need |
---|---|
Author | skander_sp |
Post date | 2011-01-25T11:32:18Z |
So easy? TKS very much
the only "special" difference i see is the AFIRM INTEGER =?AFIRM, for input parameters... a little diference make difference.
Tks, i try later, hope not more doubts
the only "special" difference i see is the AFIRM INTEGER =?AFIRM, for input parameters... a little diference make difference.
Tks, i try later, hope not more doubts
--- In IBObjects@yahoogroups.com, Dmitry Beloshistov <torin@...> wrote:
>
> Hi!
>
>
>
> Var Q:TIB_Query;
>
>
>
> //-- 1 - create SQL statement
>
> Q.SQL.Text:='execute block (AFIRM INTEGER =?AFIRM)'#13+ // input parameter here
>
> 'RETURNS (USERNAME Varchar(100))'#13+ // output here (same as in stored procedure)
>
> 'as'#13+
>
> 'begin'#13+
>
> ' for select uname from MYUSERS where firmid=:AFIRM'#13+
>
> 'into :username'#13+
>
> 'do suspend; '#13+
>
> 'end; ';
>
> //-- 2 - Prepare and set parameters
>
>
>
> Q.Prepare;
>
> Q.ParamValues['AFIRM']:=1;
>
>
>
> //-- 3 - get results
>
>
>
> Q.Open;
>
> While not Q.Eof do
>
> Begin
>
> ShowMessage(Q.FieldByName('USERNAME').AsString);
>
> Q.Next;
>
> End;
>
>
>
> Q.Close;
>
>
>
>
>
> It`s all, folks ;)
>
>
>
>
>
> WBR, Dmitry Beloshistov AKA [-=BDS=-]
>
>
>
>
>
>
>
> From: IBObjects@yahoogroups.com [mailto:IBObjects@yahoogroups.com] On Behalf Of skander_sp
> Sent: Tuesday, January 25, 2011 12:02 PM
> To: IBObjects@yahoogroups.com
> Subject: [IBO] Execute Block , help need
>
>
>
>
>
> Really I search in manual, help, forum and google before ask here...
>
> But I can't found help about execute block with example.
>
> I'm updating aplications from FB 1.5 to 2.5 (finally!! I know)
> I want to use the new facilitie of EXECUTE BLOCK, but i can't found thread explaining step by step HOW to do.
>
> I only need an example, a block with parameter and results, what IB_OBJECT must be loaded with block, with or wihout terminator, how to describe parameters, how to load values, how to execute...
>
> Some links recomended?
>
> tks
>
>
>
>
>
> __________ Information from ESET NOD32 Antivirus, version of virus signature database 5815 (20110125) __________
>
>
>
> The message was checked by ESET NOD32 Antivirus.
>
>
>
> http://www.esetnod32.ru/.ml
>
>
>
> [Non-text portions of this message have been removed]
>