VERIFIED SOLUTION i

How to store a password in a connection string so the end user is not prompted to enter the password when opening an ODBC table in MapInfo Professional

Products affected:MapInfo Pro™
 
Here is the procedure for storing a password in a connection string so the end user is not prompted to enter the password when opening an ODBC table in MapInfo Pro:

When a table is opened via ODBC in MapInfo Pro, a .tab file is created in the folder designated by the user when 1st opening the DBMS connection.
Here the tab will be written to c:\odbc: - click on the "Folder" button to browse to the desired location:
User-added image.
To store a PASSWORD (PW) with the table being opened, open the .tab file in NotePad, etc.
Then edit the connection string so that after the UID, enter PWD= and then the password followed by a semicolon to delineate between commands and save your edit.
Now when opening that table directly or via a workspace, the user should not be prompted for a PASSWORD.

See example below.
"\DATALINK\ConnectionString" = "DSN=corn;UID=migs;PWD=password;APP=MapInfo® Pro;WSID=US-D983YZ1;DATABASE=MIGS_USERDATA"

If the user has a NULL PASSWORD, i.e. is not using a password, then the edit would look like this:

BEFORE:

"\DATALINK\ConnectionString" = "Description=migs_pw_test;DRIVER=SQL Server;SERVER=7372tpwin7;UID=migs;DATABASE=MIGS_USERDATA"

AFTER:
"\DATALINK\ConnectionString" = "Description=migs_pw_test;DRIVER=SQL Server;SERVER=7372tpwin7;UID=migs;PWD=;DATABASE=MIGS_USERDATA"


 
UPDATED:  January 18, 2018