PreviousNextIndex

BUFFER-COPY( ) method

This method copies any common fields, determined by name, data type, and extent-matching, from the source buffer to the receiving buffer. If there are fields in one buffer that do not exist in the other, they are ignored. This method is used to accommodate temp-tables of joins.

Return type: LOGICAL

Applies to: Buffer object handle

Syntax
BUFFER-COPY( source-buffer-handle  
   [ , except-list [ , pairs-list [ , no-lobs ] ] ] ) 

source-buffer-handle
except-list
pairs-list
no-lobs

When copying buffers in a ProDataSet object, the AVM checks as to whether the BUFFER-COPY( ) method satisfies the following two requirements:

If these two requirements are satisfied, the BUFFER-COPY( ) method identifies the fields to copy based on the pairs-list argument specified in the ATTACH-DATA-SOURCE( ) method for the Data-source object, if any, along with either the except-list or include-list arguments, if any. Because the ATTACH-DATA-SOURCE( ) method already allows you to define a field mapping between a Data-source object buffer and a ProDataSet temp-table buffer, as well as a list of fields to include or exclude from the operation, you do not need to specify these in the BUFFER-COPY( ) method.

When copying records that contain a BLOB or CLOB field, the AVM copies the object data associated with the source record to the target record. If the BLOB or CLOB field in the source record contains the Unknown value (?), the AVM stores the Unknown value (?) in the BLOB or CLOB field of the target record. If the target record already has object data associated with it, the AVM deletes that object data before copying the new object data.

Use the no-lobs option with the BUFFER-COPY( ) method to ignore large object data when copying records that contain BLOB or CLOB fields. More specifically:

You can also use the except-list option to exclude BLOB and CLOB fields from the copy.

The following example fragment copies the Customer table to the buffer, bh, except that Customer.SalesRep is copied to a field called cust-sales-rep in the buffer:

bh:BUFFER-COPY(BUFFER Customer:HANDLE, ?, "cust-sales-rep,SalesRep"). 


OpenEdge Release 10.2B
Copyright © 2009 Progress Software Corporation
PreviousNextIndex