An object that updates one table with data from another.

Syntax

[<oRef> =] new UpdateSet( )

<oRef>

A variable or property in which to store a reference to the newly created UpdateSet object.

Properties

The following tables list the properties and methods of the UpdateSet class. (No events are associated with this class.) For details on each property, click on the property below.

Property

Default

Description

baseClassName

UPDATESET

Identifies the object as an instance of the UpdateSet class

changedTableName

 

Table to collect copies of original values of changed rows

className

(UPDATESET)

Identifies the object as an instance of a custom class. When no custom class exists, defaults to baseClassName

destination

 

Rowset object or table name that is updated or created

indexName

 

Name of index to use

keyViolationTableName

 

Table to collect rows with duplicate primary keys

parent

null

Container, form or report

problemTableName

 

Table that collects problem rows

source

 

Rowset object or table name that contains updates

 

Method

Parameters

Description

append( )

 

Adds new rows

appendUpdate( )

 

Updates existing rows and adds new rows

copy( )

 

Creates destination table

delete( )

 

Deletes rows in destination that match rows in source

update( )

 

Updates existing rows

Description

The UpdateSet object is used to update data from one rowset to another, or to copy or convert data from one format to another, either in the same database or across databases.

To update a DBF table with appendUpdate( ), delete( ), or update( ), the indexName property of the UpdateSet object must be set to a valid index. To update a DB table with the same operations, the DB table’s primary key is used by default, or you can assign a secondary index to the indexName property.

The source and destination can be either a character string containing the name of a table, or an object reference to a rowset. If the source is a rowset, the data used in the update can be filtered.

For Standard table names, specify the name of the table and the extension (DBF or DB). For all other tables, place the database name (the BDE alias) in colons before the table name; that is, in this form:

:alias:table

The named database must be open when the UpdateSet( ) method is executed.