Kbase P23732: Second buffer on Temp-table does not return expected records
Autor |
  Progress Software Corporation - Progress |
Acesso |
  Público |
Publicação |
  06/06/2005 |
|
Status: Verified
FACT(s) (Environment):
Progress 9.x
OpenEdge 10.x
SYMPTOM(s):
Second buffer on Temp-table does not return expected records
Second buffer is defined as DEFINE BUFFER <buffer> FOR <temp-table>
Record finds on second buffer return different results than finds on temp-table's default buffer
Temp-table has same name as database table
CAUSE:
This behavior is expected. It is noted in the 4GL reference for the DEFINE BUFFER statement:
"If you define a temporary table with the same name as a database table and then you define a buffer for that name, the buffer will be associated with the database table, not with the temporary table."
So if the temp table has the same name as the database table it is based on, any reference to the buffer will read records from the database table and not the Temp Table.
FIX:
Rename the Temp Table to something different from the database table name.
In OpenEdge 10.0B01 and later, it is also possible to explicitly define the buffer for the temp-table by using DEFINE BUFFER <buffer> FOR TEMP-TABLE <temp-table> in order to avoid this issue.