how to disable the ODBC connection wizard

289 Views Asked by At

I use ADO connectionstring to MariaDB in dBase and when the connection is unsuccessful (invalid userid, pwd, port number, IP address, databasename or if the server is not running), I get the MariaDB datasource connector wizard. Once I cancel or complete the wizard (both successfully or unsuccessfully), I get the ADO error into dBase.

Is there a way to disable this wizard and just return the error?

2

There are 2 best solutions below

0
Gaetano De Luisi On BEST ANSWER

For anyone interested, adding 16 (for NO_PROMPT) to the "option" part of the connectionstring disables the popup.

0
Gaetano De Luisi On

Just in case anyone is looking for the same option for SQLserver, look here: https://learn.microsoft.com/en-us/sql/ado/reference/ado-api/connectpromptenum?view=sql-server-ver15

oConn.Properties("Prompt") = adPromptNever or any other desired option from the above link

oConn.Open "Driver={SQL Server Native Client 10.0};Server=myServerAddress;Database=myDataBase;"