CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 4 of 4

Thread: Simple question

  1. #1
    Join Date
    Aug 1999
    Location
    belgium
    Posts
    31

    Simple question

    hi to all!

    i try to use the Find method of a recordset like this:

    recordset.Find " id = " & id_var " , , adSearchForward, 0




    it seems simple, but the recordset never begin seeking at the start position (it should be 0)..
    so i'm obliged to make a recordset.MoveFirst ..
    does anyone knows why ?

    thanx
    Anis



  2. #2
    Join Date
    Apr 2001
    Location
    Wisconsin, USA
    Posts
    150

    Re: Simple question

    Yes, you will need to do a recordset.MoveFirst because when you retrieve a recordset, you are at the end of the recordset. You need to go to the first record to perform any type of find or search from the first record. Telling the recordset to find with adSearchForward will tell it to search from the current record.


  3. #3
    Join Date
    Dec 2000
    Posts
    163

    Re: Simple question

    You can use this:

    recordset.FindFirst ("id = " & id_var)





  4. #4
    Join Date
    Jun 2001
    Location
    Kansas, USA
    Posts
    11

    Re: Simple question

    Hi,

    That's because you are at the end of your recordset. So, you need to explicitly use MoveFirt to move to the first record.

    Regards,
    Jagan.


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured