Scott Benninghoff wrote

>I can't seem to nail down the syntax for a stored procedure (DBProc) to
>return a result set to the application.

>My stored procedure doesn't have any parameters, it just runs SQL
>inside.  I have used SP's in other DB's and they have specified that the
>procedure returns a result set.

>Any help is appreciated.

The newest SAPDB version (7.3.0.21) provides the possibility to return
a resultset from a stored procedure. Simple Example :

CREATE DBPROC EXAMPLE RETURNS CURSOR 
AS
DECLARE :$CURSOR CURSOR FOR SELECT * FROM SYSDBA:DUAL;

The new system variable $CURSOR represents the cursor name, which may be
overwritten
in your stored procedure.

However, since this feature is brand-new, you can only use it from JDBC and
maybe from
Perl and Python.
ODBC and the Precompiler are not able to deal with this feature yet. This
will come with
one of the next versions.

Thomas

---

Thomas Anhaus
SAPDB, SAP Labs Berlin

_______________________________________________
sapdb.general mailing list
[EMAIL PROTECTED]
http://listserv.sap.com/mailman/listinfo/sapdb.general

Reply via email to