Subject Antw: Re: [IBO] tibostoredproc 4.2Fp changed params not used
Author Uwe Cramer
Hello and sorry that i post this problem 3 times,
because when i look to the list 1 hour after post i can�t find any entry
from myself.

i don�t use "set generator".
i use GOUT = GEN_ID("GEN_ABR_PRINT_NR", GIN);
and the GIN is ignored the second time

so i wrote the following test to simplify the problem
the button.a_test1.caption shows "1 1 1" and should show "1 2 3"

regards Uwe

SET TERM ^ ;
CREATE PROCEDURE MY_TEST (MYINPUT INTEGER)
RETURNS ( MYOUTPUT INTEGER)
AS
BEGIN
EXIT;
END^
SET TERM ; ^
SET TERM ^ ;
ALTER PROCEDURE MY_TEST ( MYINPUT INTEGER)
RETURNS ( MYOUTPUT INTEGER)
AS
begin
MYOUTPUT = MYINPUT;
suspend;
end
^
SET TERM ; ^

in Delphi
with IBOStoredProc1 do begin
active := false;
ParamByName('MYINPUT').asInteger := 1;
Prepare;
ExecProc;
i1 := parambyName('MYOUTPUT').asInteger;
UnPrepare;
active := false;
ParamByName('MYINPUT').asInteger := 2;
Prepare;
ExecProc;
i2 := parambyName('MYOUTPUT').asInteger;
UnPrepare;
active := false;
ParamByName('MYINPUT').asInteger := 3;
Prepare;
ExecProc;
i3 := parambyName('MYOUTPUT').asInteger;
UnPrepare;
a_test1.caption := sInt(i1,3) + sInt(i2,3) + sInt(i3,3);
end; // with


>>> Helen Borrie (TeamIBO<helebor@... ")"Newsgroups> 07.03.2002
05:04:45 >>>
At 05:35 PM 06-03-02 +0200, Uwe Cramer wrote:
>Hello,
>
>when i use the component and change the input param values via
paramsbyname
>the output param result for the first call is correct.
>but the results from the next calls with changed input param values are
the
>same as the first call.
>exsample.
>when i use one input param GIN for a generator increment count and one
>output param GOUT for the generator value.
>then i got these results
>Application start
>1. GIN := 0 / GOUT = 0 // OK
>then set GIN to 1
>2. GIN := 1 / GOUT = 0 // should be 1
>3. GIN := 1 / GOUT = 0 // should be 2
>4. GIN := 1 / GOUT = 0 // should be 3
>Application stop
>
>Application start
>1. GIN := 1 / GOUT = 1 // OK
>then set GIN to 0
>2. GIN := 0 / GOUT = 2 // should be 1
>3. GIN := 0 / GOUT = 3 // should be 1
>4. GIN := 0 / GOUT = 4 // should be 1
>

Uwe,
Your problem is not a problem of IBO params. You cannot use SET GENERATOR
in a stored procedure.


Helen Borrie (TeamIBO Support)

** Please don't email your support questions privately **
Ask on the list and everyone benefits
Don't forget the IB Objects online FAQ - link from any page at
www.ibobjects.com



___________________________________________________________________________
IB Objects - direct, complete, custom connectivity to Firebird or InterBase
without the need for BDE, ODBC or any other layer.
___________________________________________________________________________
http://www.ibobjects.com - your IBO community resource for Tech Info
papers,
keyword-searchable FAQ, community code contributions and more !

Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/