CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 4 of 4
  1. #1
    Join Date
    Aug 1999
    Location
    Pakistan
    Posts
    366

    Deleting First Record in Recordset causes error

    Whenever I delete the first record in my database VB generates an error. One way of avoising this is to disable the Delete menu at the first record.But is there a better ,logical way to avoid this?
    Thankx in advance


  2. #2
    Guest

    Re: Deleting First Record in Recordset causes error

    Hi,

    Before trying to Delete the first record in the database, are you actually positioning the record pointer (cursor) to the begining of the recordset?

    If you aren't, then try it, because it may get rid of your problem.


  3. #3
    Join Date
    Aug 1999
    Location
    Pakistan
    Posts
    366

    Re: Deleting First Record in Recordset causes error

    And how do I actually point the cursor at the first record?Does it not actually come at the first record when I delete the second last record?


  4. #4
    Join Date
    Jul 1999
    Posts
    11

    Re: Deleting First Record in Recordset causes error

    Use the MoveFirst method of the Recordset object. Check for BOF (Beginning of File) to see if you're already there. If both BOF and EOF are true, file is empty.


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