Skip to content

Latest commit

 

History

History
31 lines (24 loc) · 1.49 KB

adding-records.md

File metadata and controls

31 lines (24 loc) · 1.49 KB
title description author ms.author ms.date ms.service ms.subservice ms.topic helpviewer_keywords
Adding Records
Adding Records to a Recordset
rothja
jroth
01/19/2017
sql
ado
conceptual
AddNew method [ADO]
ADO, editing data
editing data [ADO], AddNew method
editing data [ADO], adding data

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.