Please be aware that the content in SAP SQL Anywhere Forum will be migrated to the SAP Community in June and this forum will be retired.

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's gravatar image

knbarton
26113
accept rate: 0%


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.

permanent link

answered 06 Jul '18, 21:35

Chris%20Keating's gravatar image

Chris Keating
7.8k49128
accept rate: 32%

Thank you, that fixed the problem.

(09 Jul '18, 11:11) knbarton
Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×145

question asked: 06 Jul '18, 17:11

question was seen: 3,734 times

last updated: 09 Jul '18, 11:11