Find Method

Searches a Recordset for the row that satisfies the specified criteria.

RecordsetObject.Find(SearchCriteria, FindOption)

Client support

   Newlook Smartclient

   Newlook Server

Use

If Find does not find the desired row, no error occurs, the cursor is positioned after the last record in the Recordset object, and the BOF property or EOF property is set to True.

An error will occur if a current row position is not set before calling the Find method. Any action that sets row position, such as the Move method should be called before calling the Find method.

ALERT!

This action is only supported if the Server property for the corresponding DB Connection object is set to DBServerADO.   

Arguments

Search Criteria  -  (Expression, Required)

Specifies the column name, comparison operator, and value to use in the search.

Only a single-column name may be specified. This action does not support multi-column searches

The comparison operator in may be ">" (greater than), "<" (less than), "=" (equal), ">=" (greater than or equal), "<=" (less than or equal), "<>" (not equal), or "like" (pattern matching).

The value may be a string, floating-point number, or date. String values are delimited with single quotes or "#" (number sign) marks (for example, "state = 'WA'" or "state = #WA#"). Date values are delimited with "#" (number sign) marks (for example, "start_date > #7/22/97#").

If the comparison operator is "like", the string value may contain an asterisk (*) to find one or more occurrences of any character or substring. For example, "state like 'M*'" matches Maine and Massachusetts. You can also use leading and trailing asterisks to find a substring contained within the values. For example, "state like '*as*'" matches Alaska, Arkansas, and Massachusetts. Asterisks can be used only at the end of a criteria string, or together at both the beginning and end of a criteria string, as shown above. You cannot use the asterisk as a leading wildcard ('*str'), or embedded wildcard ('s*r'). This will cause an error.

Find Option  -  (Integer, Required)

Specifies the direction of the search within the Recordset. Use one of the following pre-defined Find Option constants.

Applies To

Recordset object

See Also

DBConnect Method | Open Method | Disconnect Method | Close Method | Find Method | Move Method | AddNew Method | BeginTrans Method | CancelUpdate Method | CommitTrans Method |Delete Method | RollbackTrans Method | Seek Method | Update Method | ConnectionString property | DB Connection object


© 2004-2021 looksoftware. All rights reserved.