Subject | Re: Stored Proc Problem |
---|---|
Author | spencerr99 |
Post date | 2003-09-20T22:12:26Z |
--- In firebird-support@yahoogroups.com, "Martijn Tonies"
<m.tonies@u...> wrote:
number.
Here is the stored proc code:
COMMIT WORK;
SET AUTODDL OFF;
SET TERM ^ ;
/* Stored procedures */
CREATE PROCEDURE "NEWROWID"
(
"TABLENAME" VARCHAR(31),
"STEP" NUMERIC(8, 0)
)
RETURNS
(
"ID" NUMERIC(16, 0)
)
AS
BEGIN EXIT; END ^
ALTER PROCEDURE "NEWROWID"
(
"TABLENAME" VARCHAR(31),
"STEP" NUMERIC(8, 0)
)
RETURNS
(
"ID" NUMERIC(16, 0)
)
AS
BEGIN
if( tableName = 'person' ) then
id = GEN_ID( personr_id_gen, step );
END
^
SET TERM ; ^
COMMIT WORK;
SET AUTODDL ON;
-----------
As I said before, this works fine in IBConsole and using InterClient
JDBC. But it fails in both IBOConsole AND the Firebird JDBC. So the
problem is probably not the JDBC driver, because it seems the main SQL
parsing engine is failing.
TIA,
Spencer
<m.tonies@u...> wrote:
> Hi,TIBOInternalDataset>."
>
> > execute procedure newrowid( 'person', 1 )
> >
> > I get this:
> >
> > ISC ERROR CODE:335544327
> >
> > ISC ERROR MESSAGE:
> > invalid request handle
> >
> > STATEMENT:
> > TIBOInternalDataset:
> > "<TApplication>.frmMain.dlgWisql.<TIBOQuery>.<
> >Server.
> >
> > Statement: execute procedure newrowid( 'person', 1 )
> >
> > Any ideas?
>
> Does that procedure return any values/parameters?
>
>
> With regards,
>
> Martijn Tonies
> Database Workbench - developer tool for InterBase, Firebird & MS SQL
> Upscene ProductionsThanks, and yes, it calls a generator which returns the next generated
> http://www.upscene.com
number.
Here is the stored proc code:
COMMIT WORK;
SET AUTODDL OFF;
SET TERM ^ ;
/* Stored procedures */
CREATE PROCEDURE "NEWROWID"
(
"TABLENAME" VARCHAR(31),
"STEP" NUMERIC(8, 0)
)
RETURNS
(
"ID" NUMERIC(16, 0)
)
AS
BEGIN EXIT; END ^
ALTER PROCEDURE "NEWROWID"
(
"TABLENAME" VARCHAR(31),
"STEP" NUMERIC(8, 0)
)
RETURNS
(
"ID" NUMERIC(16, 0)
)
AS
BEGIN
if( tableName = 'person' ) then
id = GEN_ID( personr_id_gen, step );
END
^
SET TERM ; ^
COMMIT WORK;
SET AUTODDL ON;
-----------
As I said before, this works fine in IBConsole and using InterClient
JDBC. But it fails in both IBOConsole AND the Firebird JDBC. So the
problem is probably not the JDBC driver, because it seems the main SQL
parsing engine is failing.
TIA,
Spencer