Search code examples
ms-accessconnectionodbc

How do I suppress the ODBC dialog box on a DSN-Less connection?


I am trying to access a MySQL table via a DSNless ODBC connection from Microsoft Access. I ave no problem actually connecting is a valid user name and password is provided. However in either of these are not valid, the ODBC dialog screen appears asking for connection details. Is there any way of stopping the ODBC dialog screen from appearing and just letting the connection error?

My ODBC connection string is

"ODBC;Driver=MySQL ODBC 3.51 Driver;SERVER=XXXX;DATABASE=XXXX;UID=XXXX;PWD=XXXX;Option=3"


Solution

  • Take a look at - 19.1.4.2. Connector/ODBC Connection Parameters

    Specifically, the "options" parameter and its flag "FLAG_NO_PROMPT"...