GregTheGeek
Programmer
Hello all,
I have a function that will dynamically build, based on passed parameters, a connection string to our mySQL server.
I need to be able to use this code on different machines, each possibly with different versions of the mySQL ODBC driver installed (3.51, 5.1, etc). I created a work-around basing the decision based on the computer name.
I would like to, instead, read the registry to find which mySQL ODBC driver version is installed. I have found the data I need in: [tt]HKLM\Software\MySQL AB[/tt]. I would like to iterate through the sub keys in the given path and find entries that contain "ODBC", each has a "Version" value that tells me what I should use in the connection string.
I am currently using APIs, but I'll admit that I don't have a lot of experience doing so. The example that I am trying to make work uses: [tt]RegQueryValueEx[/tt] in [tt]advapi32.dll[/tt].
Let me know if I can supply any more information to make my issue more clear. If any of you have a better idea to get this information, your input would certainly be appreciated.
TIA!
Greg The Geek
GTG
I have a function that will dynamically build, based on passed parameters, a connection string to our mySQL server.
I need to be able to use this code on different machines, each possibly with different versions of the mySQL ODBC driver installed (3.51, 5.1, etc). I created a work-around basing the decision based on the computer name.
I would like to, instead, read the registry to find which mySQL ODBC driver version is installed. I have found the data I need in: [tt]HKLM\Software\MySQL AB[/tt]. I would like to iterate through the sub keys in the given path and find entries that contain "ODBC", each has a "Version" value that tells me what I should use in the connection string.
I am currently using APIs, but I'll admit that I don't have a lot of experience doing so. The example that I am trying to make work uses: [tt]RegQueryValueEx[/tt] in [tt]advapi32.dll[/tt].
Let me know if I can supply any more information to make my issue more clear. If any of you have a better idea to get this information, your input would certainly be appreciated.
TIA!
Greg The Geek
GTG