Consultor Eletrônico



Kbase P122441: Passing the DATASET-HANDLE parameter to the AppServer from a client session using -ttmarshal 3 or 4
Autor   Progress Software Corporation - Progress
Acesso   Público
Publicação   3/9/2009
Status: Unverified

SYMPTOM(s):

Passing the DATASET-HANDLE parameter to the AppServer from a client session using -ttmarshal 3 or 4 fails with error 12323

A NO-SCHEMA-MARSHAL table cannot be used as a parameter where the receiving side does not have a pre-prepared schema. (12323)

Client code calls internal procedure passing the DATASET-HANDLE which sets SCHEMA-MARSHAL = "FULL" on temp table handles

Client session started using -ttmarshal startup parameter set to value of 3 or 4

FACT(s) (Environment):

All Supported Operating Systems
OpenEdge 10.x

CAUSE:

The INPUT-OUTPUT DATASET-HANDLE parameter passed to the internal procedure that sets the SCHEMA-MARSHAL attribute to "FULL" is not being declared using BY-REFERENCE.

FIX:

The client code that uses an internal procedure to dynamically set SCHEMA-MARSHAL attribute to "FULL" for the DATASET member temp-tables, must use the BY-REFERENCE in the definition of the DATASET-HANDLE parameter.

Code example:

/* Client session started with -ttmarshal 4 using Sports2000 database connection */

DEFINE VARIABLE hDset AS HANDLE NO-UNDO.
DEFINE VARIABLE hRel AS HANDLE NO-UNDO.
DEFINE VARIABLE hServer AS HANDLE NO-UNDO.
DEFINE TEMP-TABLE ttOrder LIKE Order.
DEFINE TEMP-TABLE ttOrderLine LIKE OrderLine .

CREATE DATASET hDset.
hDset:SET-BUFFERS(BUFFER ttOrder:HANDLE, BUFFER ttOrderLine:HANDLE).
FOR EACH Order NO-LOCK:
BUFFER-COPY order TO ttOrder.
END.
FOR EACH OrderLine NO-LOCK:
BUFFER-COPY OrderLine TO ttOrderLine .
END.

CREATE SERVER hServer .
hServer:CONNECT("-URL AppServer://hostname:5162/asbroker1 ") .
RUN setMarshal (INPUT-OUTPUT DATASET-HANDLE hDset BY-REFERENCE).
RUN dsOnServer.p ON hServer (INPUT-OUTPUT DATASET-HANDLE hDset) .
PROCEDURE setMarshal :
DEFINE INPUT-OUTPUT PARAMETER DATASET-HANDLE hD .
DEFINE VARIABLE th AS HANDLE NO-UNDO.
DEFINE VARIABLE bh AS HANDLE NO-UNDO.
DEFINE VARIABLE iCnt AS INTEGER NO-UNDO.

IF NOT VALID-HANDLE(hD) THEN RETURN.

DO iCnt = 1 TO hD:NUM-BUFFERS :
bh = hD:GET-BUFFER-HANDLE(iCnt).
th = bh:TABLE-HANDLE.
th:SCHEMA-MARSHAL = "FULL".
END.
END PROCEDURE.