Skip to main content

What it does

Represents a data set.

Methods

Definition

Description

AddRecord ( dataSetRecord : IDataSetRecord )

Adds the record to the data set.

CreateQuery () : IDataSetQuery

Creates a data set query object.

CreateRecord () : IDataSetRecord

Creates a record that can be added to the data set later.

DeleteRecord ( dataSetRecord : IDataSetRecord )

Sample

If the ID is used as the primary key in the data set, and its value is set to “MyTestid”:

IDataSet dataSet = Context.DataSet( “BusinessUnits” );
IDataSetRecord rec = dataSet.CreateRecord();
rec.AddValue( “Id”, “MyTestid” );
dataSet.DeleteRecord( rec );

GetRecords (IDataSetQuery : query) : IRecordset

Gets records that satisfy query parameters from the data set.

GetRecordsCount (IDataSetQuery : query) : int

Gets the number of records from the data set that satisfy query parameters.

ModifyRecord ( dataSetRecord : IDataSetRecord )

Edits a data set record in a column with the specified primary key **.

Sample

If the ID is used as the primary key in the data set, and its value is set to “MyTestid”:

IDataSet dataSet = Context.DataSet( “BusinessUnits” );
IDataSetRecord rec = dataSet.CreateRecord();
rec.AddValue( “Id”, “MyTestid” );
rec.AddValue( “Name”, “MyName”);
rec.AddValue( “CountryCode”, “DE” );
dataSet.ModifyRecord( rec );
** The ModifyRecord and DeleteRecord methods only work with data sets that have a Primary Key column.