1

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,

2 Answers 2

2
Dim ad
ad = CreateObject("ADODB.Connection")      'create and open ODBC connection 
ad.ConnectionString = ("Driver={MySQL ODBC 5.2w Driver};Server=localhost;Database=db;UID=root;PWD=xxxxxx;option=3")
ad.Open()
Sign up to request clarification or add additional context in comments.

Comments

1

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"

2 Comments

I tried to run ODBCConf with specified parameters, but it says component not found in the registry.
solved, I had to keep MySQL ODBC 5.1 Driver in place of MySQL

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.