Skandus

 

Home
Services
Visual Basic
Office Tips
Geology
Archaeology
Contact
Downloads
Book Reviews
Publications
 
Mapinfo
 

 

Using MapInfo with Microsoft Access 

By Scott McManus

On a recent consultation we needed to connect our clients mapping system (MapInfo) to their data base application (Access). Their Users had grown from a single user to up to 5 users connecting at once via MapInfo and up to 6 data entry clerks concurrently updating their database. The setup they were currently using did not allow shared use of live mapping data.    

We found out the following about using MapInfo to display spatial data stored in Access.

MapInfo is a GIS package that is in the price range of small to medium users. It offers several ways to display data from your Access database.

In Visual Basic, through reference to a MapInfo Table.

·       As an Object Reference when programming in Visual Basic 6 through the MapInfo 5.0 OLE Automation Type Library (Which allows MapInfo to be automated in much the same way as Microsoft Word does through COM technology)

·       As a control that can be inserted when programming Visual Basic 6 that displays a table as a map or thematic map.

MapInfo there are several ways you can map your Access table to a MapInfo Table

·       Via the File>Open>Table dialog and choose the access table as the type of table you want to open. This then creates the mapping and definition files so that next time you choose the MapInfo table (*.tab) rather than setting up the connection from scratch with the underlying (*.MDB) file.  When you open the *.tab file, MapInfo will remember the settings to open and map the Access table. You have the choice of what query or table you whish to open at this initial stage. If you than need to map your data you need to use the Table>CreatePoints menu options so MapInfo knows what columns are the X and Y coordinates as well as which map projection to use. This method is fast and easy to use, fields can be updated back to the database on saving back to the Access file, however in a collaborative work space this method is a let down. When MapInfo opens the file it wants Exclusive access, so if some one has opened the Access database MapInfo will not open the table/file.

·       Via ODBC. Using File>Open ODBC Table. This is a preferred method in a collaboration work space, however it can be tricky to set up new data sources and it is a slower method then the previous one. A new Feature that is an improvement over previous versions is the Option to add a new data source from the File>Open ODBC Table rather than from the ODBC control in Control Panel.

The following are the improvements to Access data access through the recent versions of MapInfo Pro.

Ver 4.0 introduced Built-in read/write capabilities to databases through ODBC

Ver 4.1 introduced Native access to Microsoft Access databases to quickly open and save tables

Ver 5.0 introduced Better connectivity to remote databases for accessing and updating data (Live Access through ODBC)

This article first appeared as a sidebar in the March 2000 Edition of Smart Access. Reprinted with permission from Pinnacle Publishing   (http://www.pinpub.com).

and was written by Scott McManus from Skandus
 

 

books video music