1. Kevin Barton
  2. PowerBuilder
  3. Friday, 6 July 2018 21:17 PM UTC

I need to test to see if a database is running through a PowerBuilder application. Every time that I test the connection, and the database is down, the ODBC dialog box appears and the application just sits and waits for someone to respond to the window.  Is there a way to suppress the window and just have SQLCA return the error code?

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?

Brad Mettee Accepted Answer Pending Moderation
  1. Saturday, 7 July 2018 13:02 PM UTC
  2. PowerBuilder
  3. # 1

Your quotes seem to be a bit off.

You have this:

"ConnectString='DSN=DATASOURCE_TEST;UID=dba;PWD=sql;ConnectOption='SQL_DRIVER_CONNECT,SQL_DRIVER_NOPROMPT'"

But it should look like this:

"ConnectString='DSN=DATASOURCE_TEST;UID=dba;PWD=sql',ConnectOption='SQL_DRIVER_CONNECT,SQL_DRIVER_NOPROMPT'"


There's a semi-colon separating the two parts of the string, but it should be an end single quote and a comma

Comment
There are no comments made yet.
  • Page :
  • 1


There are no replies made for this question yet.
However, you are not allowed to reply to this question.
We use cookies which are necessary for the proper functioning of our websites. We also use cookies to analyze our traffic, improve your experience and provide social media features. If you continue to use this site, you consent to our use of cookies.