Subject | Re: RFC: Please unify stored procedure execution |
---|---|
Author | Roman Rokytskyy |
Post date | 2004-12-21T11:14Z |
> I don't understand, who are "we" who need this. :-)At least those who use CallableStatement interface (and alike) to call
the stored procedure.
> SQL command can return result of it execution (ok or error),Wrong. Programmer writes following code:
> return 1 row or return many rows. Procedure with suspend can return
> 1 row too.
>
> I don't see any criminal if programmer sometimes say - oops! I
> forgot to add suspend to my procedure that I used in select
> statement.
CallableStatement stmt = connection.prepareCall(sql);
stmt.registerOutParameter(2, Types.INTEGER);
stmt.setInt(1, 1);
boolean hasResultSet = stmt.execute();
At this point me, as driver developer, has to decide whether to use
SELECT * FROM or EXECUTE PROCEDURE. How?
In some previous post you wrote that this is mistake of a developer
not to put SUSPEND into the procedure that is meant to be used with
SELECT * FROM statement. Probably you're right if we assume that
people work only with isql. But as long as some component (especially
those build according to some specification) comes into play, things
are not so nice anymore.
> p.s. I don't care how execure procedure call in IBStoredProc works,You don't care about a lot of things that do not fit your world, but
> but seems that here is no "resultset".
that does not mean that it does not exist :)
Roman