Seek Method

Searches the index of a Recordset object to quickly locate the record that matches the value specified in the KeyValue parameter, and sets that record as the current record.

RecordsetObject.Seek(KeyValue, SeekOption)

Client support

   Newlook Smartclient

   Newlook Server

Use

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

Before using the Seek method with an ADO data source, you should ensure that the Index property has been set for the Recordset.

Arguments

Key Value  -  (Array, Required)

An array of values to use when searching the Recordset object. If a Recordset index includes multiple fields, specify the value for each field separated by semi-colons.

Seek Option  -  (Expression, Required)

Specifies how the records in the Recordset object should be compared with the specified key value. Use one of the pre-defined Seek Option constants.

Note

For DDM data sources, the Seek method is available for files that have key fields specified. For ADO data sources, support for this action depends upon the OLE DB provider and the Command Type that was used when the Recordset was opened. To use the seek method a Command Type of DBCmdTableDirect must be specified. The advanced view in the Connection tab of the Database Description dialog shows the behaviors for a particular Recordset. If Supports Seek is set to True, then the Seek method is available. Otherwise, Seek is not available for that Recordset.

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 | Filter property | Recordset object

 


© 2004-2021 looksoftware. All rights reserved.