Unanswered: Using OpenFromInitializationString to Open Database
Hi. I know somebody has probably answered this before, but I searched the archives way back and couldn't find an answer.
I'm trying to connect to a MySQL database in VC++ 7.0. Before I explain my problem, let me drop these facts. My MySQL database is running fine, and I can connect to it with VB without any problems. So I know that my ODBC driver is working and that the database is functioning. So, when I have the following code, I am totally lost as to what the problem is (sorry if the formatting stinks):
The string that I'm using to try to connect with is the one that the VC wizard created for me. In that wizard, I selected the option to "Test Connection" and the connection worked fine. But in my program, opening the connection fails every time. Does somebody know what the problem might be? Is there an easier way to connect to a MySQL database from VC++ 7.0 than this?
Re: Using OpenFromInitializationString to Open Database
I have the same problem, but didn't manage to make it work yet..
Could you send me a complete code that shows me how to connect to a MS Access db without any user or password info ?