Subject Re: Antw: Re: [IBO] tibostoredproc 4.2Fp changed params not used
Author Helen Borrie (TeamIBO)
At 01:19 PM 07-03-02 +0200, you wrote:
>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

OK, Uwe, the problem lies in the fact that you are trying to assign params
whilst the statement is unprepared. Oh, and "Active" is not a property you
should use when you are executing anything.

Try this:

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


regards,
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