Problem retrieving CURVAL

Uwe Haussmann <[email protected]>
Newsgroups gmane.comp.db.sapdb.general
Organization Haussmann IT Consulting
Message-ID <[email protected]>
Hallo,

I  try  to  create  a insert procedure on a table having a primary key
with DEFAULT SERIAL and return the inserted value.

But I get the following error upon creating the proc:

General error;-4024 POS(281) Unknown name.

What's wrong with Curval ?

/*******************************************************************/

CREATE DBPROC pr_Ws_Company_Groups_ins
(
        OUT retValue int,
        IN Name varchar(50),
        IN URL1 varchar(100),
        IN URL2 varchar(100)
)
As

Try
 
        INSERT
        INTO WS.Ws_Company_Groups
        (
                Name,
                URL1,
                URL2
        )
        VALUES
        (
                :Name,
                :URL1,
                :URL2
        ) ;
 
     set  retValue = Ws_Company_Groups.CURVAL ;
 
     CATCH
     IF $rc <> 100 THEN STOP ($rc,'Fehler');

/**********************************************************************/


  

-- 
mit freundlichen GrÌßen,
 Uwe Haussmann                          mailto:[email protected]
 PGP Public Key at http://www.webdevelopers.de/pgp.txt
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.