Maptitude GISDK Help

AddRecords()

Summary

Adds one or more records to a table and sets the current record.

 

Syntax

record_handle = AddRecords(string view_name, array field_names, array values, array options)

 

Argument

Contents

view_name

The name of the view containing the table

field_names

An array of field names to which values will be written

values

An array containing one element for each new record. Each element is an array of values corresponding to the field_names array.

 

Option

Type

Contents

empty records

Integer

The number of empty records to add

 

Returns

The record handle (string) for the last new record.

 

Notes

Example

rh = AddRecords("Employees",

     {"LNAME", "FNAME", "PAYRATE","YOB"},

     {

     { "Smith", "Peter", 10.75, 1948},

     { "Jones", "Paul", 11.25, 1954},

     { "Harrison", "George", 8.75, 1953},

     { "Peterson", "Jorinda", 13.22, 1961}

     }, null)

rh = AddRecords("Accident Data", null, null, {{"Empty Records", 99}})

 

Error Codes

Error Type

Meaning

Error

Invalid values in the values array; the input view does not allow addition of new records (e.g., some types of joined views and aggregate views, ODBC tables); or error writing to file (e.g., a required file is read-only, or there is not enough disk space.)

NotFound

The specified view, or some of the specified fields, does not exist

 

See Also

Function

Summary

AddRecord()

Adds a record to a table and sets the current record

DeleteRecord()

Deletes a record from a view

GetRecordsValues()

Reads the values of one or more fields for a group of records in a view

SetRecordsValues()

Writes a value or sequence of numbers into a range of cells in a view on a table

 

 

©2025 Caliper Corporation www.caliper.com