EasyManuals Logo

Omron CX-Supervisor Reference Manual

Omron CX-Supervisor
164 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #104 background imageLoading...
Page #104 background image
Database Commands SECTION 6 Functions and Methods
103
6-17 Database Commands
6-17-1 DBAddNew
Description
Adds a new record to a Recordset. This function will fail if the Recordset is
opened with a lock of 'Read Only'.
Syntax
returnstate = DBAddNew(level)
Remarks
Typical Examples
Result = DBAddNew("Northwind.Order Details")
Using a Recordset connection level, a new record is added with values from
all fields associated with a property type 'Add'. Point 'Result' is set true if this
was successful.
DBAddNew("Northwind.Order Details.OrderID")
DBAddNew("Northwind.Order Details.ProductID")
DBAddNew("Northwind.Order Details.Quantity")
DBAddNew("Northwind.Order Details.UnitPrice")
DBUpdate("Northwind.Order Details")
Using a Field connection level, each required field is added to the new record
using multiple calls to DBAddNew(). When the record is complete, it is added
by calling the DBUpdate() function
6-17-2 DBClose
Description
Argument Type Description
returnstate bool Optional. 1 if the function is successful
otherwise 0
level text A text point or constant specifying the
connection level. This should be a field or
recordset level.
Note: To use DBAddNew() with a Recordset level the Recordset must be configured
to perform this type of operation i.e. it will need to contain fields for any primary
keys and 'non null' values required to create a new record. When used at
Recordset level all fields associated with the Recordset with property type
'Add' are added (as if calling DBAddNew()) and the record is updated (as if
calling DBUpdate()). Points associated with the 'Add' property can be array
points, thus enabling you to add multiple records in one operation.
Note: When using a Field level connection, the operation may be cancelled at any
stage before the DBUpdate() function is called by calling the DBExecute()
command "CancelUpdate".
Note: Only Fields with a property type of 'Add' can be added to a Recordset. The
value(s) of the associated points at the time DBUpdate() is called will be used
to create the record.
Note: Depending on the ADO provider, the added record may not be visible until the
Recordset is requeried. See DBExecute, parameter Requery for more
information.

Table of Contents

Other manuals for Omron CX-Supervisor

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the Omron CX-Supervisor and is the answer not in the manual?

Omron CX-Supervisor Specifications

General IconGeneral
BrandOmron
ModelCX-Supervisor
CategorySoftware
LanguageEnglish

Related product manuals