Consultor Eletrônico



Kbase P102699: Error 12209 is generated when RUN STORED-PROCEDURE with LOAD-RESULT-INTO method returns a large resu
Autor   Progress Software Corporation - Progress
Acesso   Público
Publicação   05/09/2007
Status: Unverified

FACT(s) (Environment):

OpenEdge 10.0B
MS SQL DataServer

SYMPTOM(s):

LOAD-RESULT-INTO single results set can not hold more than 65,536 rows

Error 12209 using RUN STORED-PROCEDURE statement with the LOAD-RESULT-INTO method

Only <> handles supplied but there are at least <> result-sets (12209)

Only 1 handles supplied but there are at least 2 result-sets (12209)

RUN STORED PROCEDURE statement returns a result set with 65535+ records

Handle variable used for TEMP-TABLE specifies 1 extent, for example:

DEFINE VARIABLE h AS HANDLE EXTENT 1 NO-UNDO.

TEMP-TABLE handle is assigned to the first extent

CAUSE:

Bug# OE00114843

FIX:

Upgrade to OpenEdge 10.0B05 or higher release

or,

use the following workaround:
Add additional extents to the Handle variable and assign these to the TEMP-TABLE:

DEFINE VARIABLE h AS HANDLE EXTENT 2 NO-UNDO.

DEFINE TEMP-TABLE tt LIKE State.
h[1] = TEMP-TABLE tt:HANDLE.
h[2] = TEMP-TABLE tt:HANDLE.

RUN STORED-PROC send-sql-statement LOAD-RESULT-INTO h
("SELECT * FROM state").