March 3, 2021
Hot Topics:

Visual Basic Database Tutorial - Part 4

  • By Karl Moore
  • Send Email »
  • More Articles »

When it comes down to databases, you can do virtually everything in code. Here are a few of the top properties and methods of the Recordset object for you to play around with:

  • MoveNext - Moves to the next record in the Recordset
  • MovePrevious - Moves to the previous record
  • MoveFirst - Moves to the first record
  • MoveLast - Moves to the last record
  • Edit - Enters edit mode, for changing fields
  • Update - Saves any edits
  • AddNew - Adds a new, empty record
  • Delete - Deletes the current record
  • RecordCount - (Number) Returns the number of records currently accessed (move to the last record to get total number of records)
  • BOF - (Boolean) Hit when you step before the first record in a Recordset
  • EOF - (Boolean) Hit when you pass the last record in a Recordset
  • Indeed, using these simple properties and methods you could very simply replicate all the functionality of the Data control.

    Go on, have a go! Try to build a simple Customer browsing application, similar to the one we created in the third tutorial.

    Page 7 of 8

    This article was originally published on November 20, 2002

    Enterprise Development Update

    Don't miss an article. Subscribe to our newsletter below.

    Thanks for your registration, follow us on our social networks to keep up-to-date