Progress
Version 9
Product Update Bulletin


FIND-UNIQUE Method

Gets a single record. This method lets a user get a unique record that satisfies the predicate expression

Return Type: LOGICAL

Applies To: Buffer Object handle

The FIND-UNIQUE method has the following syntax:

SYNTAX

FIND-UNIQUE (predicate-expression [ , lockmode [ , wait-mode ] ] ) 

predicate-expression

A character expression that evaluates to the following syntax:

[ WHERE [ logical-expression ] ] [ USE-INDEX index-name ] 

Once evaluated, predicate-expression can contain only constants and unabbreviated references to fields from the buffer.

The predicate-expression itself can be built using a concatenation of character expressions.

lockmode

An integer expression evaluating to one of the following constants: SHARE-LOCK, EXCLUSIVE-LOCK, or NO-LOCK. You can assign NO-LOCK to an integer variable. For example, mylock = NO-LOCK.

The default is SHARE-LOCK.

waitmode

An integer expression evaluating to one of the following: NO-WAIT, 0, or ?. The default is to wait.

You can assign NO-WAIT to an integer variable. For example, mywait = NO-WAIT.

The following shows some examples of the FIND-UNIQUE method:

DEFINE VARIABLE bh AS HANDLE. 
DEFINE VAR myname as char 
bh = BUFFER customer:HANDLE. 
bh:FIND-UNIQUE("where cust-num < 3 and name = 'lift line skiing'"). 
bh:FIND-UNIQUE("where cust-num = 30"). 
  
bh:FIND-UNIQUE("where name = " + QUOTER(myname). 
MESSAGE bh:AMBIGUOUS. 

NOTES

SEE ALSO

FIND-FIRST Method, FIND-LAST Method, FIND-CURRENT( ) Method in this bulletin, and the FIND Statement in the Progress Language Reference


Copyright © 2004 Progress Software Corporation
www.progress.com
Voice: (781) 280-4000
Fax: (781) 280-4095