Kbase P1410: Extra Record Importing to Temp Table
Autor |
  Progress Software Corporation - Progress |
Acesso |
  Público |
Publicação |
  04/07/2009 |
|
Status: Unverified
FACT(s) (Environment):
All Supported Operating Systems
SYMPTOM(s):
User is importing data into a temp table
Gets an additional record which is empty
Temp table update is not undone by the transaction leaving a blank record.
CAUSE:
There is a difference between temp table transaction scoping and db table transaction scoping. With a db table we automatically wrap transaction scope around data handling code however with a temp table this needs to be specified explicitly. The empty, extra record is created by the buffer and would be removed by the transaction scope.
FIX:
Adding transaction scope to the import resolves the problem. For example:
DEFINE TEMP-TABLE ttCustomer LIKE sports2000.customer.
INPUT FROM "customer.d".
REPEAT TRANSACTION:
CREATE ttCustomer.
IMPORT ttCustomer.
END.
INPUT CLOSE.