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
execute
getFields
getTablename
setFields
-cmdSelect Object
-cmdUpdate Object
-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

cmdInsert Object
By using the cmdInsert object and its associated methods you can insert records into a data table. Insertion into a long text field is not presently supported.

Constructor

[new] cmdInsert (tablename) Constructs and returns a new cmdInsert object instance. The tablename string argument designates the table to be affected. The tablename must be quote enclosed.

Instance Methods

execute Inserts data into the specified data table
getFields Returns the cmdInsert object's field settings as specified by the setFields() method.
getTablename Returns the name of the table specified in the cmdInsert constructor.
setFields Sets the fields for the cmdInsert object.

Example

The following example inserts a record into the AddressBook table. It writes "John" to the FirstName field, "Smith" to the LastName field, and "johnsmith@address.com" to the Email field.
   //Creates a new cmdInsert object and identifies 
   //the table, "Addressbook", to be affected.
 var ins = new cmdInsert("Addressbook");

   //Identifies the fields of the Addressbook table 
   //and the data to be written in those fields.
 ins.setFields({FirstName:"John", LastName:"Smith", 
     Email:"johnsmith@address.com"});

   //Inserts a new record in the Addressbook table.
   //"John" is written to the FirstName field, 
   //"Smith" is written to the LastName field,
   //and "johnsmith@address.com" is written to the Email field.
 ins.execute();


var ins = new cmdInsert("Addressbook");
ins.setFields({FirstName:"John", LastName:"Smith", Email:"johnsmith@address.com"});
ins.execute();
Affiliate | Partner | Terms of Use | Privacy Policy | Contact Us | Pricing | Bring DataWeb In-House    
DataWeb, 720 North 10th Street, A #145, Renton, Washington 98057 *425-583-5970* Fax 484-770-4706* Email Us