momeunier wrote :

>I have a very simple stored procedure which doesn't work and i don't
>understand why
>(in fact it is my first stored procedure :)

>CREATE DBPROC DBA.GETLANGUE
>AS
>    BEGIN
>        SELECT
>            LANG_LIBELLE, LANG_CODE
>        FROM
>            DBA.T_LANGUE ;
>    END
>;

>The creation works fine but it says "no result" when i call it
>When i simply cut and paste the select in sql studio, i get my results...
>So what's the problem ???

If you want a db-procedure to return a cursor, you must specify
this fact in the create dbproc statement :

CREATE DBPROC DBA.GETLANGUE RETURNS CURSOR
AS
    BEGIN
        $CURSOR = 'MYCURSOR';
        DECLARE :$CURSOR CURSOR FOR SELECT
            LANG_LIBELLE, LANG_CODE
        FROM
            DBA.T_LANGUE ;
    END

However, SQLStudio is not able to display the result yet, but you
may process the resultset from JDBC or ODBC. 

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

Reply via email to