This section describes how to open a DBMS table.
The connection to your DBMS must be open before you can open a table. If you have not yet opened a connection or if you have restarted MapInfo Pro (and must re-open a connection), see Reconnecting to your Data Source after Startup.
To open a database table:
- On the HOME tab, in the File group, on the Open list, click Database Table.
- In the Open dialog box, from the Files of type list, select the DBMS connection to work with.
The DBMS connections that you created previously (as described under Creating a Data Source Connection) are at the bottom of the Files of type drop-down list. If you have more than one connection, then the connection name contains a sequential number indicating the order in which the connection was added.
The Select One or More Tables to Open dialog box opens.
- In the Database Tables list, select a table to open by adding a check mark beside the table name.
You can select one or more tables. Only the tables that have a check mark beside them will open.
- Optionally, select how you want the data to display on the map by selecting (highlighting) the table name and clicking Style.
This opens the Change Table Object Style dialog box where you can specify the display style for geometry (spatial object types), such as symbols, lines, and regions in the table. The custom styles that you set only apply to the table that you highlighted (whether it has a check mark beside it or not).
To select more than one table, press Ctrl while selecting table names. Your style choices are made to all of the tables that you select (that are highlighted in the Database Tables list).
- From the Preferred View drop-down list, select the view you want of this data. MapInfo Pro remembers your selection and uses it for every subsequent selection until you change it.
- Automatic - MapInfo Pro chooses the most appropriate view. If the data is mappable, such as when graphic objects are attached to the data, MapInfo Pro opens the table in a Map window. If you have a Map window displayed and the table you want to open is mappable, MapInfo Pro automatically opens the table in the current Map window. If the data is not mappable, MapInfo Pro will attempt to open the table in a Browser window. If the table cannot be mapped or browsed, MapInfo Pro opens the table using the No View option (no data is displayed).
- Browser - MapInfo Pro attempts to open the table in a Browser window.
- Current Mapper - MapInfo Pro attempts to add your data to the current Map window.
- New Mapper - MapInfo Pro attempts to open the table in a new Map window.
- No View - MapInfo Pro opens the table making the data available for other uses, but no data is displayed. You will see it in the Tables list in the Explorer window.
- Click OK.
If a MapInfo message dialog displays asking if you want to overwrite the existing file, click OK. You have previously opened this file and there is a temporary copy of the file on your machine. MapInfo Pro will overwrite this temporary copy.
The table, or tables, from your selection open in a Map window (or in a Table browser if the data is not mappable).
Applying Custom Options when Opening Database Tables
When opening a database table, you can select custom options for display styles, filters, and how to access the data (with live or linked access). The options you select are specific to how the table opens in MapInfo Pro and they override any common options set for opening database tables.
When working with a database table in MapInfo Pro, you make display style changes on the map, but you cannot save these changes back to the database table. The only way to set how table data displays on a MapInfo Pro map is to set custom display options when opening the database table.
To apply custom options to a database table, open the Select One or More Tables to Open dialog box (on the HOME tab, in the File group, on the Open list, click Database Table and selecting the database to open). Highlight the table name and then click Style or Options. You can apply the following types of custom options to the table:
- To customize how the geometry (spatial object types, such as symbols, lines, and regions) in the table display on a map, click Style. This opens the Change Table Object Style dialog box where you can choose the display styles for symbols, lines, and regions. You can change: symbol type, color, and size, as well as the label font; line color and pattern; region fill color and pattern, and border color and pattern.
- To set filters to fetch specific columns and rows from a table, click Options. In the Open DBMS Table Options dialog, choose column and row filters on the table. Filters reduce the amount of information that you will work with and reduce the time it takes to fetch and save the data. For more information, see Opening Database Tables Using Column and Row Filters.
- To select how to access the table data, by using live access or linked access, click Options. In the Open DBMS Table Options dialog, choose either Download Data (Linked Table) or Live Access. (The selection you make here overrides the common options made for tables.) For information about the linked, live, and cached options, see Setting Live or Linked Access when Opening Database Tables.
- To select the character set of the table data, click Options. In the Open DBMS Table Options dialog, select the character set of the data file from the Charset list.
If opening a large table, more than 2GB in size, click Options. In the Open DBMS Table Options dialog, select MapInfo Extended from the Format list. The default Format and Charset settings are software preferences, see Setting Your Language Preferences.
After applying custom options to a table, the table name display with an asterisk (*) beside it. When you move the mouse over the table name, it displays a summary of the custom options applied to it.
To select multiple tables, press Ctrl while selecting table names in the Select One or More Tables to Open dialog box . To select all of the tables, click Select All.
Changing the Folder Location of the MapInfo TAB File for a Database Table
When MapInfo Pro opens a database table for the first time, it creates a MapInfo TAB file (with the same name as the table) where it stores information about how to display the database table. The custom options that you select when opening a database table save to the TAB file. MapInfo Pro reads the TAB file every time you open the database table and applies the custom options that you set for the table.
The TAB file for a database table saves to the Windows %UserProfile%\My Documents folder. The %UserProfile% folder is set by default to:
C:\Users\<username>
When opening a database table, you can set where to save the TAB file for the table. To do this in the Select One or More Tables to Open dialog box, select the table name to highlight it and then click Folder. The Browse for Folder dialog box opens where you can browse for a new folder location to save the TAB file to. The new folder location displays under the Folder button in the Select One or More Tables to Open dialog box.