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? asked 06 Jul '18, 17:11 knbarton |
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. answered 06 Jul '18, 21:35 Chris Keating Thank you, that fixed the problem.
(09 Jul '18, 11:11)
knbarton
|