Find - method of object AdoRecordset

Searches a AdoRecordset for the row that satisfies the specified criteria.
Find(sCriteria As String, [nSkipRows As Long], [nSearchDirection As Long], [vStart As Variant])
oRs.Find sCriteria, nSkipRows, nSearchDirection, vStart
sCriteria(String) The value that contains a statement - specifies the column name, comparison operator, and value to use in the search. For example "Country='Czech republic'", "Date>#7/22/2011#", "Country LIKE C*", etc.
nSkipRows[optional] (Long) Specifies the row offset from the current row or vStart bookmark to begin the search. The default value is 0.
nSearchDirection[optional] (Long) The value that specifies the search direction:
1 (default) - (adSearchForward) Searches forward from the starting position. If no match, then the record pointer is placed after the last record (EOF).
-1 - (adSearchBackward) Searches backward from the starting position. If no match, then the record pointer is placed before the first record (BOF).
vStart[optional] (Variant) Specifies the starting position (Bookmark). If not set, then the starting position will be the position of the current active record. If a valid Bookmark is defined, then it will be used as starting position. It is also possible to use standard numeric constants for defining the start position:
0 (default) - (adBookmarkCurrent) Current record.
1 - (adBookmarkFirst) First record.
2 - (adBookmarkLast) Last record.
The found record is selected as the current record.
Setting the position of the active record to the first record that has in the ("name") column the value of ("pi"), over the PmAdo object ("/TestAdoDb"), that is already connected to the database (see DbOpen), using the SQL query ("SELECT * FROM table1").
VBScriptSelect and copy to clipboard

Dim oDb, oRs
Set oDb = pMe.Pm("/TestAdoDb")
Set oRs = oDb.RsOpen("table1", "SELECT * FROM table1", "cursor:static;")
If Not oRs Is Nothing Then
  oRs.Find "name='pi'", 0, 1, 1
End If
PROMOTIC 8.3.30 SCADA system documentation - MICROSYS, spol. s r.o.

Send page remarkContact responsible person
© MICROSYS, spol. s r. o.Tavičská 845/21 703 00 Ostrava-Vítkovice