At my work we have Windows 10 and we use ODBC to connect to databases from SPSS, Rstudio and other apps. Recently we added a new registry entry to register a new database connection:
Windows Registry Editor Version 5.00
[HKEY_CURRENT_USER\Software\ODBC\ODBC.INI\MYDATABASE123]
"Driver"="C:\\WINDOWS\\system32\\SQLSRV32.dll"
"Description"="MYDATABASE123"
"Server"="lab_prod.db.mydomain.com"
"Database"="labresults_P01"
"Trusted_Connection"="Yes"
And after I add this using a .reg file, I can connect to the database using the ODBC source MYDATABASE123
, so this all works fine.
However, when I open either the ODBC Data Sources (64-bit)
or ODBC Data Sources (32-bit)
from the startmenu, I don't see this entry anywhere, not on the "User DNS" tab or on the "System DNS" tab or any other tab.
I noticed that another (older) entry under HKEY_LOCAL_MACHINE\Software\ODBC
is visible, so I tried adding my new entry also at that same place in the registry, but then it's still not visible in the ODBC Data Sources. So I've added both:
Computer\HKEY_LOCAL_MACHINE\Software\ODBC\ODBC.INI\MYDATABASE123
Computer\HKEY_CURRENT_USER\Software\ODBC\ODBC.INI\MYDATABASE123
So my question is
- why is it that this ODBC connection is active (I can infact use it) but not visible in the ODBC Data Sources?
- Do I have to add the ODBC data source at some other place?
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Office\ClickToRun\REGISTRY\MACHINE\Software\ODBC\ODBC.INI\ODBC Data Sources
. Note also that Access can open an ODBC connection without a DSN by using the data under your registry key, the Windows API does not oblige using a DSN.