cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Choose Language Hide Translation Bar
Sol
Sol
Level I

How to prevent the popup of alert window ("Microsoft SQL Server Login") when SQL connection failed

Try(
	batch interactive(1);
	dbc = Create Database Connection("Driver={SQL Server};Server=xx.xxx.x.xx;Database=testDB;UID=test;PWD=test;");
	batch interactive(0);
);

If the SQL DB connection through JSL code fails (due to the network issue), the following window appears and exposing the server address to users.

 

Sol_0-1692671549241.png Sol_1-1692671577413.png

I encrypt the JSL code before deploying it since I don't want the server address to be exposed to users. However, if I cannot hide that window, encrypting the code becomes pointless

1 ACCEPTED SOLUTION

Accepted Solutions

Re: How to prevent the popup of alert window ("Microsoft SQL Server Login") when SQL connection failed

These dialogs are coming from the ODBC driver manager / SQL Server interaction, and are out of JMP's control.  You might try searching on SQL Server connection parameters to see if these can be suppressed.  There is one article that suggests adding the following to the SQL Server connection string, but this is typically more for password prompts than error messages.

 

ConnectOption='SQL_DRIVER_CONNECT,SQL_DRIVER_NOPROMPT'

 

Brian Corcoran

JMP Development

View solution in original post

1 REPLY 1

Re: How to prevent the popup of alert window ("Microsoft SQL Server Login") when SQL connection failed

These dialogs are coming from the ODBC driver manager / SQL Server interaction, and are out of JMP's control.  You might try searching on SQL Server connection parameters to see if these can be suppressed.  There is one article that suggests adding the following to the SQL Server connection string, but this is typically more for password prompts than error messages.

 

ConnectOption='SQL_DRIVER_CONNECT,SQL_DRIVER_NOPROMPT'

 

Brian Corcoran

JMP Development