Subject Re: [IBO] DSQL and EXECUTE PROCEDURE
Author Helen Borrie
At 07:27 PM 6/03/2006, you wrote:
>Hello Helen,
>
>I should have explained better...
>
>
>In Database Workbench, someone wants to execute a procedure and
>see the results. Now, this can be done via "Run" on a procedure, but
>this customers says that this is supported in DSQL, so it should work
>from the SQL Editor. The SQL Editor has a grid in which it can
>display result sets.
>
>But as far as I can see, EXECUTE PROCEDURE ...
>RETURNING_VALUES doesn't do a resultset.

That's the wrong syntax for DSQL. That's PSQL you are quoting there.


>If I would be writing this:
>EXECUTE PROCEDURE FOO (:p1) RETURNING_VALUES :p2
>
>would that work? Would "p2" get the value?

No. PSQL doesn't work in DSQL.

EXECUTE PROCEDURE FOO (:p1);

When it's prepared, the server will send the description of the
xsqlvar back in the xsqlda structure; then the dataset will know to
anticipate the return value.


> > TIBOStoredProc is also a TIBODataset descendant. Use ExecProc there.
> >
> > But why would you use a dataset component at all, when you could use
>TIB_DSQL?
>
>Because it's linked to a 3rd party grid via the "dataset" property :)

Weird grid. Should be linked via the datasource property. :-)

Helen