If the Datalink part of the metadata is missing, the table is not connected to a database. Maybe it was at some point unlinked via that command in MapInfo Pro. You can't undo that.
The TableID is typically missing in older tables created by older versions of MapInfo Pro.
Original Message:
Sent: 04-08-2025 21:34
From: Dhanushka Sandanuwan
Subject: How to re-link broken linked tables
Hey Pete,
Thank you for your response.
You are correct! When I compare both TAB files, I notice that the one with the broken link lacks everything after the "begin_metadata." (including)
I can find the relevant tables & DB views in the database. Is there a way to re-link the TAB files to relevant tables/views on the database using MapInfo without manually updating the TAB file?
For example, TableID is missing in the TAB file with the broken link, and I believe this should be automatically generated by MapInfo
"\MapInfo\TableID" = "4d2e9581-d485-4e6e-9514-40bdb42f3ec0"
------------------------------
Thanks & Regards
Dhan
VIC, Australia
Original Message:
Sent: 04-04-2025 01:22
From: Peter Møller
Subject: How to re-link broken linked tables
Hey Dhan
We first need to find out why the link got broken.
The connection information is stored inside the TAB file. You can open the TAB file in a text editor and inspect the connection details.
Look in the metadata section in the TAB file for the DATALINK elements.
Here is an example from one of my linked tables:
!table!version 1520!charset UTF-8Definition Table Description "VERMONTBUSINESSES Within Depots_Drivetime" Type LINKEDX Charset "UTF-8" Locale "da-DK" Fields 2 NAME Char (10) ; MI_PRINX Float ;begin_metadata"\IsReadOnly" = "FALSE""\MapInfo" = """\MapInfo\TableID" = "8e3e1ba5-ac73-4474-af01-2a19115eb2b9""\DATALINK" = """\DATALINK\ConnectionString" = "DSN=PreciselySnowflake""\DATALINK\Query" = "select ""VERMONTBUSINESSES"".""GEOG"", ""Depots_Drivetime"".""NAME"", ""VERMONTBUSINESSES"".""MI_PRINX"" from ""SPATIAL"".""ATSMIPRO"".""VERMONTBUSINESSES"", ""SPATIAL"".""ATSMIPRO"".""Depots_Drivetime"" where (""VERMONTBUSINESSES"".""S""\DATALINK\Query\+1" = "IC6"" = '018101') and ST_WITHIN(""VERMONTBUSINESSES"".""GEOG"" ,""Depots_Drivetime"".""GEOM"")""\MAPCATALOG" = """\MAPCATALOG\IS_MAPPABLE" = "TRUE"...
Start by inspecting DATALINK\ConnectionString
element, which tells you what data source (DSN) is used. This string can also hold other details besides the DSN name. This depends on how the initial connection to the database was established.
Ensure you have a connection on your system that is exactly like the one mentioned here.
Now, look at the DATALINK\Query element. This element contains the query sent to the database to retrieve the records. Note that the query can span multiple elements in the metadata section, as you can see above.
Ensure the database, schema, and table mentioned exist.
Maybe you will get an error when you try to refresh the linked table. That can also help shed some light on the cause of the broken link.
------------------------------
Peter Horsbøll Møller
Principal Presales Consultant | Distinguished Engineer
Precisely | Trust in Data
Original Message:
Sent: 04-04-2025 00:48
From: Dhanushka Sandanuwan
Subject: How to re-link broken linked tables
Dear All,
I have many tables located in different folders that were previously linked to a DBMS, and the link later became broken. Therefore, I cannot refresh the TAB files using "Table > Database > Refresh DBMS Table"
In the following example, AMT_xxxxxx.TAB file is linked. AM_xxxxxxx.TAB file is not linked.

How to re-establish the broken link with the relevant tables on the DBMS in this case? Do I need to keep both the table name and the TAB file name the same?
In the MapInfo Pro documentation, I could only find the way to "Unlink DBMS Table".
------------------------------
Thanks & Regards
Dhan
VIC, Australia
------------------------------