PreviousNextIndex

BUFFER-COMPARE( ) method

This method does a rough compare of any common fields, determined by name, data type, and extent-matching, between the source buffer and the target buffer. The resulting logical value is either TRUE or FALSE as a whole. A single field that does not compare causes the entire buffer to return FALSE. If there are fields in one buffer that do not exist in the other, they are ignored.

Return type: LOGICAL

Applies to: Buffer object handle

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

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

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

If these two requirements are satisfied, the BUFFER-COMPARE( ) method identifies the fields to compare 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-COMPARE( ) method.

When comparing records that contain BLOB fields, the AVM performs a binary comparison on the BLOB data associated with the source and target records.

Use the no-lobs option with the BUFFER-COMPARE( ) method to ignore large object data when comparing records that contain BLOB or CLOB fields. You can also use the except-list option to exclude BLOB and CLOB fields from the compare.

The following example fragment performs a binary compare of all fields in the buffers, except for the two specified fields:

BUFFER-COMPARE(bh2, "binary", "cust-sales-rep,SalesRep"). 


OpenEdge Release 10.2B
Copyright © 2009 Progress Software Corporation
PreviousNextIndex