Working with catalog and tables, Locating open tables – Pitney Bowes MapXtreme User Manual
Page 162

Chapter 8: Working with Data
Working with Catalog and Tables
MapXtreme v7.1
169
Developer Guide
Working with Catalog and Tables
This section covers some basic table operations, including:
•
•
•
•
Listening to Table and Catalog Events
See also the MapInfo.Data.Table class in the MapXtreme Developer Reference.
Locating Open Tables
To locate open tables, you must enumerate the catalog. This is done by using the methods in the
following sections.
Catalog.GetTable
The MapInfo.Data.Catalog.GetTable method returns the Table object referenced by the TableAlias
parameter. This must be a table which has already been opened. If no such table is found (or the
table has subsequently been closed), then the method returns null.
Catalog.Item (Indexer)
MapInfo.Data.Catalog.Item property can be used as an indexer for locating a Table by its Alias. This
is functionally equivalent to using the Catalog.GetTable method but generates code that is easier to
read. The Alias must specify a table which has already been opened.
VB example:
Public Shared Sub MapInfo_Data_Catalog2()
Dim tbl As Table
For Each tbl In Session.Current.Catalog
System.Console.WriteLine("Table: " + tbl.Alias)
Next
End Sub
View
A view based on a MapInfo SQL Select statement (not a native SQL
supported by Server tables). See
.
ResultSet
A table containing the results of a search. ResultSet is used exclusively for
IResultSetFeatureCollections. See