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...