List:MaxDB« Previous MessageNext Message »
From:Brian Kavanaugh Date:April 12 2003 5:52pm
Subject:Unknown Result Table
View as plain text  
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...




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