Kbase P151842: How to find the length, in bytes, of each record of a Progress / OpenEdge Database table?
Autor |
  Progress Software Corporation - Progress |
Acesso |
  Público |
Publicação |
  08/02/2011 |
|
Status: Verified
GOAL:
How to find the length, in bytes, of each record of a Progress / OpenEdge Database table?
GOAL:
How to use the Buffer Object Handle RECORD-LENGTH attribute to get the size, in bytes, of each record of a Progress / OpenEdge Database table?
GOAL:
How to use the 4GL/ABL RECORD-LENGTH function to access the size, in bytes, of each record of a Progress / OpenEdge Database table?
GOAL:
How to get the size of a record
GOAL:
How to determine the length of a record within a database.
FACT(s) (Environment):
All Supported Operating Systems
Progress 9.x
OpenEdge 10.x
FIX:
Choose one of the following:
1. Either the Buffer Object Handle RECORD-LENGTH attribute or the 4GL/ABL RECORD-LENGTH function may be used to find the length, in bytes, of each record of a given Progress / OpenEdge Database table.
2. The following code snippet shows how to use Buffer Object Handle RECORD-LENGTH attribute to get the record sizes, in bytes, of the customer table. Please replace 'customer' with the name of your table before running this code:
DEFINE VARIABLE hBufferHandle AS HANDLE NO-UNDO.
/* Please replace 'customer' with your table...*/
hBufferHandle = BUFFER Customer:HANDLE.
FOR EACH customer NO-LOCK:
DISPLAY hBufferHandle:RECORD-LENGTH .
END.
3. The following code snippet shows how to use the RECORD-LENGTH function to display the record sizes, in bytes, of the customer table. Please replace 'customer' with the name of your table before running this code:
DEFINE VARIABLE hBufferHandle AS HANDLE NO-UNDO.
/* Please replace 'customer' with your table...*/
FOR EACH customer NO-LOCK:
DISPLAY RECORD-LENGTH(customer).
END.