Script to setup odbc connections
I'm using the following to setup an odbc connection. The script works and adds the entry to the registry but if you go look in Windows under odbc connections-systemDSN it is not listed. Not sure what I am missing. Thanks.
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SOFTWARE\ODBC\ODBC.INI\Munis Crystal Reports]
"Driver"="C:\\Windows\\system32\\sqlncli.dll"
"Description"="Munis Live Data"
"Server"="Ourservername"
"Database"="Ourdatabasename"
"LastUser"="sa"
"Trusted_Connection"="Yes
"
0 Comments
[ + ] Show comments
Answers (4)
Answer Summary:
Please log in to answer
Posted by:
ckubaska
12 years ago
Got it figured out. Needed to add a key under data source as well.
Thanks for the help.
Comments:
-
let me guess
[HKEY_LOCAL_MACHINE\SOFTWARE\ODBC\ODBC.INI\ODBC Data Sources]
"Ourdatabasename"= - SMal.tmcc 12 years ago
Posted by:
dugullett
12 years ago
Is it 64 bit?
Comments:
-
Would like to have it work on x86 and x64 eventually but currently attempting x86. - ckubaska 12 years ago
Posted by:
SMal.tmcc
12 years ago
Did you install and register sqlncl.dll?
http://social.technet.microsoft.com/Forums/en-US/excel/thread/189ae710-8b1c-4285-99d1-e6f5e6a7740b/
Comments:
-
Yes, installed and registered. I can setup the odbc connection manually in system dsn and it works. I've exported the registry key and attempting to add it on a test box. It adds to the registry but doesn't show under system dsn if you go into it in windows. - ckubaska 12 years ago
Posted by:
ckubaska
12 years ago
Hoping this shows a bit better what is happening. I've added an odbc in data sourse admin and it shows in this location in the registry but if I add it in the same area in the registry and do not use data sourse administrator it fails to show in the list.