Mapinfo8 MySQL5 Connection
I only tried this using point objects.
-
Download and install MyODBC3.5.1
-
Create database mapinfotest
-
Create the mapinfo_mapcatalog table as follows:
<br /> CREATE TABLE `mapinfo_mapcatalog` (<br /> `SpatialType` float NOT NULL default '0',<br /> `TableName` char(32) NOT NULL default '',<br /> `OwnerName` char(32) NOT NULL default '',<br /> `SpatialColumn` char(32) NOT NULL default '',<br /> `DB_X_LL` float NOT NULL default '0',<br /> `DB_Y_LL` float NOT NULL default '0',<br /> `DB_X_UR` float NOT NULL default '0',<br /> `DB_Y_UR` float NOT NULL default '0',<br /> `CoordinateSystem` char(254) NOT NULL,<br /> `Symbol` char(254) NOT NULL default '',<br /> `XColumnName` char(32) NOT NULL default '',<br /> `YColumnName` char(32) NOT NULL default '',<br /> PRIMARY KEY (`TableName`,`OwnerName`)<br /> ) ENGINE=MyISAM DEFAULT CHARSET=latin1;<br />
-
create a sample table with two (2) decimal columns for the latitude and longitude.
<br /> CREATE TABLE `poi_orig2` (<br /> `poiid` decimal(10,0) unsigned NOT NULL default '0',<br /> `id` char(10) NOT NULL default '',<br /> `py_name` char(255) character set utf8 default NULL,<br /> `latitude` decimal(20,8) default '0.00000000',<br /> `longitude` decimal(20,8) default '0.00000000',<br /> PRIMARY KEY (`poiid`,`id`)<br /> )<br />
- Open Mapinfo 8
-
File -> Open DBMS Connection
- Table > Maintenance > Make DBMS Table Mappable
Fill up the necessary values for the x,y and the index column.
You need to choose an index column so Mapinfo could update the record/s in MySQL, normally it would be an ID. Once successful you should be able to see the success window…
- Open the table
Click on the upper right corner to open a dbms connection. After selecting the datasource (mine is system) then it would give you a list of tables to choose from.