ADO find method compare with DAO findfirst method...

ADO find method compare with DAO findfirst method...

Post by Wong Yee Che » Wed, 17 Feb 1999 04:00:00



I am used to use DAO findfirst method, which, if the criteria does not
match, will return a nomatch message..
However, I found ADO find method can't do that, it seem simply give an
runtime error to me when it doesn't find anything based on the
criteria...what should I do?
 
 
 

ADO find method compare with DAO findfirst method...

Post by John Rile » Wed, 17 Feb 1999 04:00:00


Quote:>I am used to use DAO findfirst method, which, if the criteria does not
>match, will return a nomatch message..
>However, I found ADO find method can't do that, it seem simply give an
>runtime error to me when it doesn't find anything based on the
>criteria...what should I do?

It'll only give you a runtime error if you don't trap the EOF.

ie:

With ADO.Recordset
    .Find Searchstring
    IF .EOF then
        msgbox "Record Not found"
        exit sub
    else
        msgbox "Record Found!"
    End If
End With

-------  That type of thing...

Cheers!
John.

 
 
 

1. Searching with ADO (What is the equivalent of the DAO FindFirst method)

I am have just started using ADO code and the ADO data control. Much to my
surprise, however, I could not find the familiar FindFirst method that I
used to use with DAO. Could somebody please help me find the ADO equivalent
of this method so that I can search through a recordset?

Thanks in advance,

Jack Fattal

2. Why does using two indexes slow down my query?

3. DAO 3.6 and FindFirst Method (Error 3251)

4. Help for: "TNS:internal network communication error"

5. Findfirst method and DAO 3.6/Jet 4.0

6. float datatypes losing decimals

7. Find method over FindFirst ?!

8. connection question

9. findfirst method not in ado vb 6.0

10. FindFirst method not available for ADO recordset

11. ADO FindFirst method

12. Comparing Access Methods RDO x ADO x OLE DB

13. DAO Find method on counter field