First, your recordset must have a lockType declared as something other than the default of adReadOnly(1) --
Then, if you are UPDATEing existing records, just move to the desired record in the recordset, and assign values to the fields like you would for any other variable:
rs("fieldName" = value
and then call the .update method on the recordset:
rs.update
to run the update on the database. If you don't call .update, then the changes are made to the rs, but not the database (since the rs is a snapshot of the data, not the actual data).
If you want to add new records to the rs:
rs.addNew
rs("fieldName" = value
rs.update
works like INSERT does in a pure SQL type solution.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.