Problem finding first record using CDaoRecordset 
Author Message
 Problem finding first record using CDaoRecordset

I checked the MSDN library and I could not find any suggestions about the
best way to open an MDB file and read the first record.

My method works fine the first time I call my function (after calling
myDaoRecordset.Open()).

However the next time I execute the code below I do not get the first
record.  By the first record I mean the first row in my MDB file.

  if(!myDaoRecordset.IsBOF())
    myDaoRecordset.MoveFirst();

Any ideas about what I am doing wrong here?

For example, do I need to use some combination of the following:
m_strSort = ???
myDaoRecordset.m_strFilter = ???
myDaoRecordset.Requery();

Or, do I need to use SetBookmark(), GetLastModifiedBookmark()?

My Recordset type is Dynaset.

TIA.

Michael T.



Sun, 11 Sep 2005 05:16:47 GMT  
 
 [ 1 post ] 

 Relevant Pages 

1. Problem finding first record using CDaoRecordset class

2. CDaoRecordset can't find record

3. CDaoRecordset can't find record

4. Problem with find a record using DAO

5. Reading records using MFC CDaoRecordSet (fast method required!)

6. Reading records using MFC CDaoRecordSet (fast method required!)

7. Utility to find out modified record using Checksum algorithm

8. Finding records using CRecordset

9. Finding last record added using ODBC

10. CDaoRecordSet -- CDaoRecordSet -- CDaoRecordSet

11. How to use CDaoRecordset::AddNew to create new records

12. CDaoRecordset - adding new records

 

 
Powered by phpBB® Forum Software