Name
Update (Command Object, Recordset Object) —
rsObj
.Update
FieldName(s)
,
FieldValue(s)
Synopsis
Saves changes to the underlying data provider.
Parameters
-
FieldName(s) The name of a single field in the record to be updated or the name of an array containing the names of multiple fields in the record to be updated. If
FieldName(s)is the name of a field name array,FieldValue(s)must be the name of a value array, and the number of elements for both arrays must be the same or an error occurs.-
FieldValue(s) The value of a single field in the record to be updated, or the name of an array containing the values of multiple fields in the record to be updated. If
FieldValue(s)is the name of a value array,FieldName(s)must be the name of a field name array, and the number of elements for both arrays must be the same or an error occurs.
Example
The following code example demonstrates a call to the Update method to save changes to the current record to the database.
<%@ LANGUAGE="VBSCRIPT" %> <% Response.Buffer = True %> <HTML> <HEAD> <TITLE>ADO Examples</TITLE> </HEAD> <BODY> <% ' Include ADOVBS.INC so we can use the ADO constants. %> <!-- #include virtual = "/bc_SSIncludes/adovbs.inc" --> <% ' Dimension local array variables. Dim avntFieldNames( ) Dim avntFieldValues( ) ' Instantiate an ADO Connection object. Set objDBConn = Server.CreateObject("ADODB.Connection") ' Construct the connection string for the Connection object. strConn = _ "driver={MyDBType};;uid=sa;pwd=;database=SalesDB" ...Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access