Επεξεργασία

Κοινή χρήση μέσω


Adding Records to a Recordset

Use the AddNew method to create and initialize a new record in an existing Recordset. You can use the Supports method with a CursorOptionEnum value of adAddNew to verify whether you can add records to the current Recordset object.

After you call the AddNew method, the new record becomes the current record and remains current after you call the Update method. If the Recordset object does not support bookmarks, you might not be able to access the new record once you move to another record. Therefore, depending on your cursor type, you might need to call the Requery method to make the new record accessible.

If you call AddNew while editing the current record or while adding a new record, ADO calls the Update method to save any changes and then creates the new record.

This section contains the following topics.