Search these areas:
Help
Support Forums
Product Info



Introduction
DataWeb: What's New
Creating an Application
The DataWeb Designer
Application Management
Data Tables
Data Tables
Views
Templates
Components
Data Analysis
Members
Security
Importing
Exporting
FTP
JavaScript
Object Model
JavaScript Objects
General Scripting Objects
Data Access Objects
cmdDelete Object
cmdInsert Object
cmdSelect Object
cmdUpdate Object
-execute
-getFields
-getFilter
-getTablename
-setFields
-setFilter
Data Access Method Arguments
Field Object
Fields Collection
Index Object
Indexes Collection
previous Object
record Object
Resultset Object
Table Object
Tables Collection
TextImporter Object
Settings Object
View Object
Web Object
File Access Objects
Http Client Objects
Security and Membership Objects
Document Object Model (DOM)
Error Descriptions
Object Model Extensions
Full-Text Search
Domain and Email Hosting
HotBlock Modules
Account Management
Glossary
New Responsive UI Module





DataWeb Help
Support Forums
Tutorial
Script Library
Knowledge Base

Home > Support

DataWeb User's Guide

cmdUpdate.setFields()
Syntax

cmdUpdate.setFields(fields)

Arguments Description
fields Sets the fields for the cmdUpdate object, overwriting any prior setting.

Returns

Return value is undefined.

Description

The cmdUpdate.setFields() method specifies the columns and the value of the data used to update the column by the cmdUpdate.execute() method call. The fields argument may be an object, object literal, or an URL syntax string specifying the field names of a given table. To review field syntax, see the link above.

An update on a long text fields is not supported.

Example

The following examples illustrate three different ways of specifying the fields argument for the setFields() method. The first example uses an object to set the fields, the second example uses an object literal, and the first example uses URL syntax. To review syntax for setting the fields argument see the discussion in Data Access Method Arguments.

    //Example #1: This example uses an object to
    //set the field argument.  
  var ins = new cmdUpdate("AddressBook");
  var fields = new Object();
  fields.FirstName = "Mary";
  fields.LastName = "Smith";
  ins.setFields(fields);

    //Example #2: This example uses an object literal to
    //set the field argument.  
  var ins = new cmdUpdate("Addressbook");
  ins.setFields({FirstName:"Mary", LastName:"Smith"});
 
    //Example #3: This example uses URL syntax to set
    //the field argument.  
  var ins = new cmdUpdate("AddressBook");
  ins.setFields("?FirstName=Mary&LastName=Smith");


Related Topics

cmdUpdate Object, cmdUpdate.getFields(), cmdUpdate.execute()
Affiliate | Partner | Terms of Use | Privacy Policy | Contact Us | Pricing | Bring DataWeb In-House    
Email Us