Maptitude GISDK Help |
A dataview can be created encapsulating the data contained in a COM Active Data Object (ADO) Recordset. Use the OpenTable() function with a table type of ADO and a spec array of either one or two elements. The first element must be a COMObject value containing an ADO Recordset interface. The optional second item can specify the name of a field in the recordset which can be used as a key field, with unique values for identifying individual records in the recordset, thereby allowing values to be edited. For example:
rst = CreateCOMObject("ADODB.Recordset",)
sql = "Select * from MyTable"
conn_str = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=c:\\my_db.mdb"
rst.Open(sql, conn_str)
view_name = OpenTable("ADO Data", "ADO", {rst, "ID"})
Note that ADO dataviews cannot be saved to a file with the SaveEditor() function, Similarly, if a layer in a map is joined to an ADO dataview and one or more of the ADO columns used for labelling or for a map theme, then the map will not be able to be saved to a file.
©2025 Caliper Corporation | www.caliper.com |