Subject Re: [IBO] Re: Why IBOStoredProc1 & IB_StoredProc1 behave differently ?
Author Jason Wharton
I think it has to do with you are not using the SUSPEND and instead you are
using EXIT. This may cause a different behavior.

Also, TIB_StoredProc and TIBOStoredProc are totally different components.
One may be doing an EXECUTE PROCEDURE and the other may be doing a SELECT *
FROM ...

I suggest that you use a SUSPEND at the very end and use a SELECT * to
execute the procedure.

Please watch what happens in the SQL trace monitor to know exactly what is
happening.

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


----- Original Message -----
From: <terrylei@...>
To: <IBObjects@egroups.com>
Sent: Wednesday, November 22, 2000 7:02 PM
Subject: [IBO] Re: Why IBOStoredProc1 & IB_StoredProc1 behave differently ?


> hi Jason, see below for the stored proc
>
> SET TERM !!;
> CREATE PROCEDURE STP_GRAPHIC_SAVENEW
> (Name VarChar(30),ImageFile BLOB SUB_TYPE 0, CategoryID Numeric
> (18,0) )
> RETURNS (Result VarChar(80), GraphicID Numeric(18,0) )
> AS
> DECLARE VARIABLE PkID Numeric(18,0);
> BEGIN
> PkID = GEN_ID(GEN_GRAPHIC_ID,0) + 1;
> INSERT INTO TBL_GRAPHIC( GRAPHIC_ID,
> CATEGORY_ID,GRAPHIC_NAME,GRAPHIC_FILE )
> VALUES ( :PkID ,:CategoryID, :Name ,:ImageFile );
> Result = 'New Graphic saved.';
> PkID = GEN_ID(GEN_GRAPHIC_ID,1);
> EXIT;
> WHEN SQLCODE -803 DO
> BEGIN
> Result = 'New Graphic Could not save - Duplicate Value';
> EXIT;
> END
>
> END !!
> SET TERM ;!!
>
>
>
> --- In IBObjects@egroups.com, "Jason Wharton" <jwharton@i...> wrote:
> > Not sure, what does the stored proc look like?
> >
> > Jason Wharton
> > CPS - Mesa AZ
> > http://www.ibobjects.com
> >
> >
> > ----- Original Message -----
> > From: <terry@i...>
> > To: <IBObjects@egroups.com>
> > Sent: Thursday, November 02, 2000 6:50 PM
> > Subject: [IBO] Why IBOStoredProc1 & IB_StoredProc1 behave
> differently ?
> >
> >
> > > I hope someone can enlighten me, the code for IB_StoredProc1
> works
> > > beautifully but the same code apply to IBOStoredProc1 execute no
> > > action. See below for my codes for both IB_StoredProc1 &
> > > IBOStoredProc1.
> > >
> > > with IB_StoredProc1 do
> > > begin
> > > StoredProcName := 'STP_CATEGORIES_SAVENEW';
> > > ParamByName('Name').AsString := FormVar('CATEGORY_NAME','');
> > > ParamByName('Descpt').AsString := FormVar
> ('CATEGORY_DESC','');
> > > ExecProc;
> > > end;
> > >
> > > with IBOStoredProc1 do
> > > begin
> > > StoredProcName := 'STP_CATEGORIES_SAVENEW';
> > > ParamByName('Name').AsString := FormVar('CATEGORY_NAME','');
> > > ParamByName('Descpt').AsString := FormVar
> ('CATEGORY_DESC','');
> > > ExecProc;
> > > end;
> > >
> > > 10s
> > >
> > >
> > >
> > >
> > >
>
>
>
>
>