Subject Re: [IB-Java] Re: Escaped syntax for CallableStatement: need your help/input
Author David Jencks
On 2001.12.11 15:13:16 -0500 rrokytskyy wrote:
> > I don't see how sun can force you to allow developers to use
> > randomized parameter list orders. What spec requirement is
> > violated by doing your "first idea"? I thought this stuff was to
> > take care of databases (oracle??? not sure) where you could declare
> > all your sp parameters in, out, or inout, but (in some versions of
> > oracle) couldn't easily determine from the db what the params were,
> > so you have to give the jdbc driver some hints. Is it really
> > intended to allow you to arbitrarily reorder the parameters of an
> > existing stored procedure?
>
> There's nothing in the specs about the order, but consider the code
> (that was developed for general case) executed using our driver:
>
> CallableStatement stmt = con.prepareCall("{call myproc(?,?,?)}");
> stmt.setInt(1, 10);
> stmt.registerOutParam(2, Types.CHAR);
> stmt.setString(3, "test");
> stmt.execute();
>
> then, if we simply kill the out parameter in the call (we
> prepare "EXECUTE PROCEDURE myproc(?,?)" since Firebird has no out
> params and isc_dsql_prepare fails on "EXECUTE PROCEDURE myproc
> (?,?,?)"), then
>
> stmt.setString(3, "test");
>
> throws an SQLException with message like "Column unknown" or
> something like that...
>
> Or am I wrong?
I don't know--

This is exactly what I don't understand-- the "general case". Why do we
need to assume the above example should work? It assumes we can define
stored procedures on any db with identical semantics. I haven't tried to
find the part of the jdbc spec that discusses this, but I think this is
unreasonable. If it is not explicitly required by the jdbc spec, I'd say
go for simplicity. If it is required, I'd like to see where adn just what
they say.

Thanks

david jencks
>
> Best regards,
> Roman.
>
>
>
> 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/terms/
>
>
>
>
>