List:MaxDB« Previous MessageNext Message »
From:Marcin P Date:April 14 2003 6:37am
Subject:Re: Unknown Result Table
View as plain text  
Hello,
I had a similar error as yours.
As someone from SAP team has explained -
out parameters are not allowed when you use
db-proc's which return recordsets.
Regards,
Marcin Pytel

Uzytkownik "Brian Kavanaugh" <bkavanaugh@stripped> napisal w wiadomosci
news:FAEEKEIEPEMJOCNPPDJMKEIACPAA.bkavanaugh@ style="color:#666">stripped...
> > From: "Brian Kavanaugh" <bkavanaugh@stripped>
> > To: <sapdb.general@stripped>
> > Subject: Unknown Result Table
> > Date: Sat, 12 Apr 2003 12:52:41 -0500
> >
> > Using 7.4.3.17 on Windows 2000. If I create a stored procedure like
this:
> >
> > CREATE DBPROC spUserGetGUID (
> > IN UserID VARCHAR(50),
> > OUT USERGUID CHAR(32)
> > ) RETURNS CURSOR AS
> >
> > DECLARE :$CURSOR CURSOR FOR
> > SELECT USERGUID FROM Brian.tblUser WHERE UserID = :UserID;
> > IF $RC = 0 THEN FETCH INTO :USERGUID;
> >
> > I get the following error message when I try to call it using ODBC:
> >
> > Microsoft OLE DB Provider for ODBC Drivers error '80004005'
> >
> > [SAP AG][SQLOD32 DLL][SAP DB]General error;-4000 POS(1054) Unknown
result
> > table.
> >
> > If I change it to the following:
> >
> > CREATE DBPROC spUserGetGUID (
> > IN UserID VARCHAR(50),
> > OUT USERGUID CHAR(32)
> > ) RETURNS CURSOR AS
> >
> > $CURSOR = 'MYCURSOR';
> >
> > DECLARE MYCURSOR CURSOR FOR
> > SELECT USERGUID FROM Brian.tblUser WHERE UserID = :UserID;
> > IF $RC = 0 THEN FETCH INTO :USERGUID;
> >
> > When I try to create it in SQL Studio 7.4, I get the same error message,
> > pointing to the "fetch" statement.
> >
> > Auto Commit: On, SQL Mode: Internal, Isolation Level: Committed
> > General error;-4000 POS(229) Unknown result table.
> >
> > What should I do to work around this? Before I upgraded from 7.3.0.34,
the
> > first dbproc was working...
>
> Never mind... I don't need to be declaring/using a cursor here. I used the
> wrong template for this db proc...




Thread
Union in dbprocBrian Kavanaugh6 Apr
  • Re: Union in dbproc(Peter Willadt)6 Apr
    • RE: Union in dbprocBrian Kavanaugh6 Apr
RE:Union in dbprocThomas Anhaus7 Apr
  • Unknown Result TableBrian Kavanaugh12 Apr
re: Unknown Result TableBrian Kavanaugh13 Apr
Re: Unknown Result TableMarcin P14 Apr