Is there no commandline options for odbcad32.exe?

6.2k Views Asked by At

I want to create a DSN, using odbcad32.exe (32-bit), from the commandline. But when I execute "odbcad32 /?", it is displaying the window to create the DSN manually. The commandline facility is available for odbcconf (64-bit version), but I need it for 32-bit and I cannot use GUI to create because I need to automate this. Any help..?

2

There are 2 best solutions below

1
On BEST ANSWER

Instead of using the command line, populate the ODBC registry directly. You will find that it is very easy to do. Just have a look at HKLM\Software\ODBC\ODBC.INI (for system DSN), or HKCU\Software\ODBC\ODBC.INI

Please note that on 64-bit machines the node will be under SOFTWARE\Wow6432Node\ODBC

0
On

the command is odbcconf.exe despite may be it's more easy to use directly the registry.Here's an example