Subject Re: prepareCall problem
Author info@wilsoncom.de
Hi David,
you were right. I tried

CallableStatement cstmt = oSQLConn.prepareCall( "{call GET_NOTIZID}");
ResultSet rs = cstmt.executeQuery();
rs.next();
ret = rs.getInt( 1 );

and it works. Not exactly JDBC conform!

Thanks for your help.
Mark

--- In IB-Java@y..., David Jencks <davidjencks@d...> wrote:
> I never got the {call...} syntax to work with ic. You might try the
> firebird syntax plain, I probably don't remember it exactly right,
> something like
> con.prepareCall("execute procedure GET_NOTIZID");
>
> You might also try removing the apparent input param "?"
>
> Hope this helps
>
> david jencks
>
> On 2001.10.18 04:46:29 -0400 info@w... wrote:
> > Hi,
> > I´m trying to call a stored procedure GET_NOTIZID which has no input
> > parame=
> > ters and one output parameter of type INTEGER:
> >
> > CREATE PROCEDURE GET_NOTIZID returns (ID Integer)
> > AS
> > BEGIN
> > ID = gen_id(NOTIZ_GEN, 0);
> > SUSPEND;
> > END
> >
> > It works fine in isql, but when i try calling it in a java-app. using:
> > CallableStatement cstmt = oSQLConn.prepareCall( "{call GET_NOTIZID(?)}"=

> > );
> > cstmt.registerOutParameter( 1, Types.INTEGER );
> > ResultSet rs = cstmt.executeQuery();
> > rs.next();
> > ret = rs.getInt( 1 );
> >
> > I get the following error-message:
> >
> > [interclient][interbase] Dynamic SQL Error
> > parameter mismatch for procedure GET_NOTIZID
> >
> > interbase.interclient.SQLException: [interclient][interbase] Dynamic SQ=
L
> > Er=
> > ror
> > parameter mismatch for procedure GET_NOTIZID
> >
> > Anybody got any an idea what i´m doing wrong?
> > TIA.
> > Mark
> >
> >
> >
> > To unsubscribe from this group, send an email to:
> > IB-Java-unsubscribe@egroups.com
> >
> >
> >
> > Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/term=
s/
> >
> >
> >
> >