views:

505

answers:

1

Hi,

Is there anyway to create a System DSN enter for MYSQL database (windows OS), with silent installation of MySQL ODBC Drivers programatically either through batch script or any other language?

If drivers installation is not possible , atleast automatic DSN entery would be helpful.

Thanks,

A: 

On the command line, run odbcconf.exe with appropriate parameters. For example

ODBCConf ConfigSysDSN "SQL Server" "DSN=LocalODBCConnection|SERVER=(local)"

for MySQL

ODBCConf ConfigSysDSN "MySQL" "DSN=LocalODBCConnection|SERVER=MySQL_ServerName"
Raj More
I tried to run ODBCConf with specified parameters, but it says component not found in the registry.
JPro
solved, I had to keep MySQL ODBC 5.1 Driver in place of MySQL
JPro