Skip to content

AddData

Appends a new row to the specified target table and returns the inserted row as a DataRow object.

1
$Database.AddData(schema: string, table: string, input: object):DataRow

Adds a new row to the specified target table in the target data store and returns the inserted row as an object.

1
$Database.AddData(store: string, schema: string, table: string, input: object):DataRow

Parameters

string schema
    The name of the target schema.

string table
    The name of the target table.

object input
    A JavaScript object containing the column values for the new row.

string store
    Name or Id number of target data store. This parameter is optional.

Returns

A DataRow object representing the newly inserted row.

Remarks

Example

1
2
3
4
5
$Database.AddData('MySchema', 'MyTable', {
    Id : $Xml.Evaluate('Id'),
    Name : $Xml.Evaluate('Name'),
    State : 'W'
});

See Also