Results 1 to 2 of 2

Thread: error after MoveFirst if db is empty

  1. #1

    Thread Starter
    New Member
    Join Date
    Jul 1999
    Posts
    14

    Post

    An error occurs when after MoveFirst if a db is empty. What should I do? Ask if RecordCount=0 before? Another way?
    Thanks!

    Please, forgive my English, it's horrible!

  2. #2
    Junior Member
    Join Date
    Jan 1999
    Location
    Seattle WA USA
    Posts
    21

    Post

    I haven't found RecordCount to be a reliable property to use. Most often, I find newly initialized recordsets attached to empty tables to have a RecordCount of 4. However, the EOF property does seem to be dependable. So, in my code anywhere it might encounter a recordset like that, you will find something like this:
    If Not RecordSet1.EOF Then
    RecordSet1.MoveFirst
    Else Goto SkipTheWholeDarnThing
    Regards,
    Dave Todd


    ------------------

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