Subject Re: Why IBOStoredProc1 & IB_StoredProc1 behave differently ?
Author terrylei@nettmail.com.sg
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
> >
> >
> >
> >
> >