cancel
Showing results for 
Search instead for 
Did you mean: 

Suppress ODBC prompt

Former Member
4,776

I need to test to see if a database is running through a PowerBuilder application. Every time that I test the connection the ODBC dialog box appears and the application just sits and waits for the return. What I want to do is if it fails the connection just return an error code in SQLCA.

This is my DBParm setting SQLCA.DBParm = "ConnectString='DSN=DATASOURCE_TEST;UID=dba;PWD=sql;ConnectOption='SQL_DRIVER_CONNECT,SQL_DRIVER_NOPROMPT'"

PowerBuilder 2017 and SQL Anywhere 16.

Any Ideas?

Accepted Solutions (1)

Accepted Solutions (1)

chris_keating
Product and Topic Expert
Product and Topic Expert

Your DBParm is incorrect. The correct format is as follows:

"ConnectString='DSN=EAS Demo DB V126;UID=dba;PWD=<******>',ConnectOption='SQL_DRIVER_CONNECT,SQL_DRIVER_NOPROMPT'"

The problems with the DBPARM is provided is that the ConnectString must be closed with a quote and the ConnectString and ConnectOption must be separated with a comma not a semicolon.

Former Member
0 Kudos

Thank you, that fixed the problem.

Answers (0)