Adding, Deleting, and Updating Recordsets - PowerPoint PPT Presentation

1 / 5
About This Presentation
Title:

Adding, Deleting, and Updating Recordsets

Description:

Adding, Deleting, and Updating Recordsets AddNew Method (ADO) Creates a new record in the edit buffer. The data are not actually written to the underlying database ... – PowerPoint PPT presentation

Number of Views:56
Avg rating:3.0/5.0
Slides: 6
Provided by: Compute383
Learn more at: http://www.cs.uwyo.edu
Category:

less

Transcript and Presenter's Notes

Title: Adding, Deleting, and Updating Recordsets


1
Adding, Deleting, and Updating Recordsets
2
AddNew Method (ADO)
  • Creates a new record in the edit buffer.
  • The data are not actually written to the
    underlying database table until you call the
    Update method.
  • Syntax
  • recordset.AddNew
  • Example
  • Adodc1.Recordset.AddNew

3
Update Method (ADO)
  • Saves any changes you make to the current record
    of a recordset object.
  • Syntax
  • recordset.Update
  • Example
  • Adodc1.Recordset.Update

4
CancelUpdate Method (ADO)
  • If you are editing a record, the CancelUpdate
    method will restore the contents of the current
    record to the values that existed before editing
    began.
  • Syntax
  • recordset.CancelUpdate
  • Example
  • Adodc1.Recordset.CancelUpdate

5
Delete Method (ADO)
  • Removes the current record from the recordset.
  • Typically, the MoveNext method is called so that
    a current record will exist.
  • Syntax
  • recordset.Delete
  • Example
  • Adodc1.Recordset.Delete
  • Adodc1.Recordset.MoveNext
Write a Comment
User Comments (0)
About PowerShow.com