IT SOLUTIONS
Your full service technology partner! 
-Collapse +Expand
To/From Code
   ► KBTo/From GuidesReferenceDatabase  Print This     

Edit Record (Cross Ref > Database)

Edit Record

Languages Focus

This common syntax name documents editing a record as a whole: add/insert, edit, post data, and delete.

ASP Classic:   AddNew, Update, Delete

In ASP, using ADO, you use RecordSet.AddNew to add a new record, Recordset.Update to post the record, and RecordSet.Delete to delete it. To edit a record, you open the RecordSet using an editable cursor.

Syntax Example:

The following code snippet adds a record to a given editable RecordSet with FullName and Created fields:

objRS.AddNew
objRS.Fields("FullName") = "Barack Obama"
objRS.Fields("Created")  = Now
objRS.Update

Delete() Method Notes

  • After deleting a record, the deleted record remains current until you move to a different record.
  • If you are in batch update mode the deletion happens when you call the UpdateBatch method.
  • To use this method assure that the Recordset object allows record deletion.

More Info

Corel Paradox:   insertRecord, postRecord, edit

In ObjectPAL, you use Cursor.InsertRecord to add a new record, Cursor.postRecord to post the record, and Cursor.deleteRecord() to delete it. To edit a record, you must put the cursor into edit mode, Cursor.Edit(). (A cursor applies to both a TCursor and UIObject.)

ObjectPAL gives you tremendous flexibility with editing data and includes many additional commands such as insertAfterRecord and isEdit. For dBASE tables, you can also use unDeleteRecord() to un-delete a record. See the ObjectPAL help for more commands.

Syntax Example:

The following code snippet adds a record to a given TCursor with FullName and Created fields:

tc.edit()
tc.InsertRecord()
tc.FullName = "Barack Obama"
tc.Created  = today()
tc.postRecord

More Info





Sales Website: www.prestwood.com Or visit our legacy sales site: 
legacy.prestwood.com


©1995-2024 Prestwood IT Solutions.   [Security & Privacy]