Consultor Eletrônico



Kbase 21275: Error 7334 When Creating a Buffer in an Internal Procedure
Autor   Progress Software Corporation - Progress
Acesso   Público
Publicação   11/28/2008
Status: Verified

FACT(s) (Environment):

Progress 9.1C

SYMPTOM(s):

Could not create buffer object for table <table name>. (7334)

Dynamically creating a buffer for a static TEMP-TABLE Inside an internal procedure.

CAUSE:

Bug# 20010822-021

CAUSE:

This error occurs because of the way Progress searches for a table name reference inside an internal procedure when executing the CREATE BUFFER Statement.  The search mechanism Progress uses inside an internal procedure only works for real database tables, not temp-tables.  It is easy for Progress to find the real tables in the database schema.  In the main block, when it can't find it as a database table, it looks for a temp-table that might have been defined previously.

FIX:

You must define a handle variable to store the default temp-table buffer handle and use that variable with the CREATE BUFFER Statement.  For example:

DEFINE VARIABLE vhTTBuffer AS HANDLE NO-UNDO.
DEFINE VARIABLE vhTTBufHdl AS HANDLE NO-UNDO.

DEFINE TEMP-TABLE ttTable NO-UNDO
FIELD field1 AS CHARACTER.

ASSIGN vhTTBufHdl = TEMP-TABLE ttTable:DEFAULT-BUFFER-HANDLE.

RUN createTTBuffer.

PROCEDURE createTTBuffer:
CREATE BUFFER vhTTBuffer FOR TABLE vhTTBufHdl.
END PROCEDURE.