Some Operations Require a Map Catalog
MapInfo Pro opens SQLite database tables as mappable without requiring a MapInfo Map Catalog. With other types of databases, such as Oracle or SQL Server, MapInfo Pro stores information about spatial tables and views in the database in a special table called a Map Catalog (a MAPINFO_MAPCATALOG file). MapInfo Pro does not need to do this with a SQLite database.
However, the following operations in MapInfo Pro require the presence of a Map Catalog and generate an error when working with tables in a SQLite database that do not have a Map Catalog:
- Picking a table in the Make Table Mappable dialog box, which only lists tables that do not have a geometry column in the SQLite table.
- Picking a table in the Change DBMS Style dialog box.
- Using the SERVER CREATE MAP and the SERVER CREATE STYLE MapBasic statements (these fail with an error message and error code 1730).
These operations generate the following error message when the SQLite database does not have a Map Catalog:
The MAPCATALOG on the specified connection is Read Only.
Handling Conversion of UTF-16 SQLite Source Data to ANSI MapInfo Pro Table Data
The FDO (Feature Data Objects) SQLite source data is converted from Unicode (WideChar) to the current default ANSI code page. Depending upon the conversion, it is possible that a table column may have data which cannot be represented in the target code page. If so, any non-convertible characters will be represented by the character '_' in MapInfo Pro.
When a non-convertible data found in the table column, the column is flagged as Read Only.
To prevent data loss, no change to data in the flagged column will be written back to the data store. Since the entire column is flagged as Read Only, all updates to data in this column will be disabled including data which was not converted.
If you execute an UPDATE or INSERT statement which includes this flagged column, it will return errors and the changes will be rolled back.
In MapInfo Pro, this behavior will be enabled by default. To override this default and enable update of the data store table, you must add IgnoreUnconvertedCharUpdates=FALSE to the FDO SQLite connection string, using a semicolon (;) as a separator.
For example:
"\DATALINK\ConnectionString" =
"File=C:\ProgramFiles\MapInfo\Data\SQLite\databasename.sqlite;PROVIDER=OS
Geo.SQLite;UseFdoMetadata=TRUE;IgnoreUnconvertedCharUpdates=FALSE"
Display of SQLite Column Types in MapInfo Pro
When loading Date, Time, and DateTime column types from SQLite, MapInfo Pro displays them as DateTime fields:
- The Date column in SQLite displays with the correct date and with a default Time value within MapInfo Pro (for example, "05/12/2012 12:00:00.000 AM").
- The Time column in SQLite displays with the correct time and a default Date value within MapInfo Pro (for example, "-1/-1/-001 12:40:45.166 PM").
- The DateTime column displays the correct date and time (for example, example: "05/12/2012 12:42:54.770 PM").
When saving a DateTime field in MapInfo Pro back to a SQLite table, the DateTime value saves as a DateTime object (with values for both date and time) in the SQLite table. Values that contain an invalid date (such as -1/-1/-001) save with only the time portion of the value.