Try OpenEdge Now
skip to main content
ABL Reference
Handle Attributes and Methods Reference : BUFFER-CREATE( ) method
 

BUFFER-CREATE( ) method

Creates a record, sets fields to their default values, and moves a copy of the record into the buffer.
Return type: LOGICAL
Applies to: Buffer object handle

Syntax

BUFFER-CREATE ( [ tenant-expression ] )
tenant-expression
This parameter is useful only for a multi-tenant database, and primarily one with a connection identity that has super tenant access. If the user has a super-tenant connection identity and you do not specify this parameter, the record you create is owned by the effective tenant. If you do specify this parameter, you create a record owned by the regular tenant identified by tenant-expression.
If the user has a regular-tenant connection identity, and you specify this parameter, tenant-expression must match the tenancy of the connection identity. Otherwise, the statement raises ERROR.
If tenant-expression evaluates to an integer, the value must be a valid tenant ID for a regular tenant or zero (0) for the default tenant. If tenant-expression evaluates to a character string, the value must be a valid tenant name for a regular or "Default" for the default tenant. Otherwise, the statement raises ERROR.
If Buffer object handle references a buffer in a table that is not multi-tenant enabled, the method raises ERROR.

Notes

*The BUFFER-CREATE( ) method corresponds to the CREATE statement.
*When working with a partitioned table, creating a record without initially setting the partition fields to valid values may cause an error. See CREATE statement for more details.
*When you pass tenant-expression, the AVM looks up the tenant identity in the database with a share lock. The AVM waits 60 seconds to get the share lock and raises ERROR if it fails to obtain the share lock in that amount of time. The AVM releases the share lock immediately after successfully fetching the row. This share lock is released even if the statement is called while in the scope of a transaction.