1. Daniel Vivier
  2. PowerBuilder
  3. Wednesday, 13 December 2017 13:56 PM UTC

My PB17 program is connecting to a MySQL server over the Internet (through an SSH tunnel for relative safety). I'm testing what happens when the Internet goes down.

There is a place where it is doing an embedded SQL statement (an Update). We test sqlca.sqlcode after that, and if it is not 0 (i.e. it failed) we put up a message and give the user an option to reconnect. However, it seems that PB is also putting up its own messagebox, as follows:

Any idea how to prevent that? It's certainly not something we coded. And it really doesn't seem as if anything else in our program could be trying to do something at the same time - this action is in a timer (to check and mark that we are still connected, once a minute) and it's the only thing happening right then.

The transaction object we are using is our own inherited version, but all that is in its dberror event is setting a couple of instance variables.

Thanks.

Daniel Vivier Accepted Answer Pending Moderation
  1. Saturday, 16 December 2017 19:44 PM UTC
  2. PowerBuilder
  3. # 1

Might this be worth posting a bug report for, with some sample code? Testing the sqlca.sqlerrtext should be sufficient - PB shouldn't be putting up its own message on a problem with some embedded SQL when the SQL server isn't accessible.

Comment
There are no comments made yet.
Daniel Vivier Accepted Answer Pending Moderation
  1. Wednesday, 13 December 2017 15:36 PM UTC
  2. PowerBuilder
  3. # 2

Thanks, Chris and Roland (who gave identical answers) but I already have exactly that in my dbParm.

Comment
  1. Brad Mettee
  2. Thursday, 14 December 2017 13:48 PM UTC
Have you tried searching your app for "Data Entry Error" to see where else the msg might be coming from? That title doesn't look like something you'd find in MySQL or PB.

  1. Helpful
  1. Daniel Vivier
  2. Saturday, 16 December 2017 19:43 PM UTC
Actually I disagree Brad, "Data Entry Error" is a typical PB internal data or datawindow-related message title, in my experience. It's the default value (I'm pretty sure we haven't changed it) of any application object's DWMessageTitle property. Also, we use a MessageBox replacement, but this is coming out in a standard messagebox, so it's not from my code.



DWMessageTitle is explained in the Help for the Application Object as: "Specifies the title of the message box for any runtime DataWindow® errors encountered in the application. ..."



The problem with that, is when the error is occurring in my code, I'm not even doing anything with a DataWindow - it's embedded SQL.

  1. Helpful
There are no comments made yet.
Roland Smith Accepted Answer Pending Moderation
  1. Wednesday, 13 December 2017 15:10 PM UTC
  2. PowerBuilder
  3. # 3

Try this DBParm value:

ConnectOption='SQL_DRIVER_CONNECT,SQL_DRIVER_NOPROMPT'

I know it works for SQL Anywhere.

Comment
There are no comments made yet.
Chris Pollach @Appeon Accepted Answer Pending Moderation
  1. Wednesday, 13 December 2017 15:06 PM UTC
  2. PowerBuilder
  3. # 4

Hi Dan;

    Have you tried this in your SQLCA.DBParm field ...

SQLCA.DBParm = " ConnectOption='SQL_DRIVER_CONNECT,SQL_DRIVER_NOPROMPT' "

Regards ... Chris

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.