Bug #59010 DSN name value validation is missing
Submitted: 17 Dec 2010 19:44 Modified: 17 Dec 2010 22:27
Reporter: Jerry Schwartz Email Updates:
Status: Verified Impact on me:
None 
Category:Connector / ODBC Severity:S4 (Feature request)
Version:5.1.8-win32 OS:Windows
Assigned to: Assigned Account CPU Architecture:Any

[17 Dec 2010 19:44] Jerry Schwartz
Description:
I installed mysql-connector-odbc-5.1.8-win32 today, and tried to create a new DSN. Although a test worked, the resulting DSN was not created. I tried with both "system" and "user" DSNs.

No entries were made in the registry.

By editing the registry myself, I was able to build new DSNs that worked.

The system is running Vista-32

How to repeat:
1. Install MyODBC 5.1.8-win32.
2. Configure a DSN (either "user" or "system").
3. Test the new DSN from the configuration screen: it should work.
4. Close the configuration screen.
5. The new DSN will not be listed.
6. Examine the registry. There should be an entry that looks more or less like this:

[HKEY_LOCAL_MACHINE\SOFTWARE\ODBC\ODBC.INI\MainTable_USA (local test)]
"Driver"="C:\\Program Files\\MySQL\\Connector ODBC 5.1\\myodbc5.dll"
"SERVER"="localhost"
"UID"="access"
"PWD"="xxxx"
"DATABASE"="maintable_usa"
"PORT"="3306"

but there won't be.

Suggested fix:
The solution is to figure out why the registry isn't being updated, and make the code do so.
[17 Dec 2010 21:17] Lawrenty Novitsky
Jerry,
I can suggest you to remove parentheses from DSN name, everything's gonna work then.
According to http://msdn.microsoft.com/en-us/library/ms713587%28v=VS.85%29.aspx those symbols are not allowed in a data source name.
Regards,
lawrin novitsky
[17 Dec 2010 21:29] Jerry Schwartz
Thanks.

You are absolutely right. I was unaware of that limitation.

Some kind of error message would be nice. <whine>
[17 Dec 2010 22:27] Lawrenty Novitsky
Now you are right - we must have that data validation with user friendly warnings. reopening bug as feature request. need to verify if that is not a duplicate though.
also changing synopsis.