Currently I'm using the following in access 07
and it works fine for what I need it to do - pulling data off a remote mysql server.
A problem arises when a user no longer has an active internet connection or if the server is down. In the help file it states that if the Name portion of the OpenDatabase method is blank (OpenDatabase(""... <-- that part) and the connection type is ODBC then it would open the ODBC dialog box.
Is there a way to turn off or suppress this option? I would prefer to not have a user looking at/able to play around with the mysql connection options. I have tried setting the Name option to the name of the db but I still get the ODBC dialog box when I try to test.
I have been able to band-aid this so far by having users cancel the ODBC dialog box since access just throws an error and I can handle it through error handling, but I would rather the user not have to deal with this part at all.
Code:
MyConnectionString = "ODBC;Driver={MySql ODBC 3.51 Driver};Server=SERVER;Port=3306;Option=131072;Stmt=;Database=MOTDDB;Uid=USERID;Pwd=PWORD"
Set db = OpenDatabase("", dbDriverNoPrompt, False, MyConnectionString)
and it works fine for what I need it to do - pulling data off a remote mysql server.
A problem arises when a user no longer has an active internet connection or if the server is down. In the help file it states that if the Name portion of the OpenDatabase method is blank (OpenDatabase(""... <-- that part) and the connection type is ODBC then it would open the ODBC dialog box.
Is there a way to turn off or suppress this option? I would prefer to not have a user looking at/able to play around with the mysql connection options. I have tried setting the Name option to the name of the db but I still get the ODBC dialog box when I try to test.
I have been able to band-aid this so far by having users cancel the ODBC dialog box since access just throws an error and I can handle it through error handling, but I would rather the user not have to deal with this part at all.