Oracle Objects for OLE
Release 9.2

Part Number A95895-01
Go To Documentation Library
Home
Go To Product List
Book List
Go To Table Of Contents
Contents

Master Index

Feedback

FindFirst, FindLast, FindNext, FindPrevious Methods

See Also
Example
FindFirst Method

Applies To

OraDynaset

Where FindClause is any valid SQL where clause without the 'WHERE'.

Description

These methods find the indicated rows in the dynaset that matches FindClause. FindClause can be any valid where clause without the 'WHERE'. If the current FindClause matches the last clause from the previous Find, the current FindClause is not re-parsed.

These methods move the current row directly to a matched row without calling any advisories except when the matched row is reached. If a matching row cannot be found, the NoMatch property is set to TRUE and you remain in the row you started.

Usage

oradynaset.FindFirst FindClause

oradynaset.FindLast FindClause

oradynaset.FindNext FindClause

oradynaset.FindPrevious FindClause

Remarks

You can use the following types of expressions in the FindClause:

· simple queries, such as "deptno = 20"

· queries involving complex expressions, such as "sal + 100 > 1000".

· SQL function calls, such as "UPPER(ename) = SCOTT' " or "NVL(comm, 0) = 0" .

· subqueries, such as "deptno in (select deptno from dept)".

The like operator will not work in multi-byte languages. Table or synonym "DUAL' is required in user's schema. Date values are retrieved and compared in VB format which is actually the format specified in the Control Panel. Therefore, date comparisons will fail if any other format such as the default Oracle format DD-MON-YYYY is used.

SQL function TO_CHAR (date,fmt) cannot be used because the first argument must be a date in native Oracle format and OO4O only handles 'string dates'.

SQL function TO_DATE will convert a string to a date, but the OIP will convert it back to a string in VB format as described above and the comparison may still fail.

FindPrevious and FindLast in a NO_CACHE dynaset will not work; NoMatch will be set to TRUE.

Note: To avoid raising an error, check for EOF or BOF before calling a Find method.


 
Oracle
Copyright © 1994, 2002 Oracle Corporation.

All Rights Reserved.
Go To Documentation Library
Home
Go To Product List
Book List
Go To Table Of Contents
Contents

Master Index

Feedback