I have been working with the MySQL ODBC 3.51 Driver for several years and I can dynamically create a User DSN for any database I am using.
However, I have been asked to switch over to the MySQL ODBC 5.2a Driver. I have changed my code to reflect the change in driver and while it does create a DSN, it does not create it for the proper port or server. I cannot figure out what I am doing wrong.
I am using the following code snippet
----------------------------------
Attributes = "DSN=" & sDSN & vbNullChar _
& "SERVER=" & strHost & vbNullChar _
& "Database=mydb" & vbNullChar _
& "Port=" & strPort & vbNullChar
intRet = SQLConfigDataSource(vbAPINull, lAction, sDriver, Attributes)
----------------------------------
which works when using the 3.51 driver but only gives me port 3306 with the 5.2a driver, even though all other parameters are the same except the driver.
Is there a change to the syntax in the 5.2a driver that I cannot figure out?
I've read this article
http://downloads.mysql.com/docs/connector-odbc-en.pdf
but it only refers to creating the DSN's manually.
Any help is appreciated. TIA, rasinc