Method 1Update Method of the Recordset object saves the changes done to the record.
Syntax:-Rsobject1.Updatewhere Rsobject1 is the name of the recordset object.
rsstudent.Fields("FirstName") = ‘Richard’
rsstudent.Fields("Age") = 30
where rsstudent is a variable of recordset object and Firstname and Age are the names of fields in a table.
NOTE:- Connect to the database and open the recordset before using the above code
Method 2Execute method of the Connection object executes an SQL statement such as insert, update and delete.
Connobject1.Execute (sql) where sql statement is a valid UPDATE statement and Connobject1 is the name of a connection object.
Strupdate = ”Update student set age=40 where idno=101”
where Connect1 is a variable of connection object and strupdate is a variable name.
NOTE:- Connect to the database before using the above code (Method 2)