Bug #61726 DAO-RegisterDatabase Method creates DSN without the parameters - Server,Uid etc.
Submitted: 2 Jul 2011 10:35 Modified: 4 Jul 2011 7:10
Reporter: Pranab Sarma Email Updates:
Status: Duplicate Impact on me:
None 
Category:Connector / ODBC Severity:S3 (Non-critical)
Version:5.1.8 OS:Windows
Assigned to: CPU Architecture:Any
Tags: DAO, ODBC 5.1.8, VB 6

[2 Jul 2011 10:35] Pranab Sarma
Description:
I am using Visual Basic 6.0 - DAO RegisterDatabase method to programmatically create a ODBC data source name (DSN). I am using MySQL Connector/ODBC 5.1.8 driver. The above method creates the desired DSN without saving the parameters sent like Server, Uid, PWD, Database etc. Therefore, after creating the DSN programnatically when we click on the <Configure> button for the DSN in ODBC Data Source Administrator of Windows XP it shows only the Data Source Name. The other fields showing TCP/IP Server, User, Password and Database all remain blank. 

How to repeat:
Visual Basic 6.0 Code-

Public Sub DatabaseRegistration()
Dim strAttributes as String

strAttributes = "DATABASE=MyDatabase;OPTION=3;PORT=3306;SERVER=MyServer;UID=root;PWD=mysqlpwd;"
DBEngine.RegisterDatabase AppName, "MySQL ODBC 5.1 Driver", True, strAttributes 

End Sub

Suggested fix:
Suggest to modify the driver to programatically accept values sent in the attributes as above
[4 Jul 2011 7:10] Bogdan Degtyariov
This bug is a duplicate of bug #41796.