The forum will be down for maintenance over the weekend of August 18-20, 2017. The forum will be shut down on the evening (EDT) of Friday, August 18. Downtime is unknown but may be up to two days. The forum will be restarted as soon as maintenance is complete.

Based on its powerful facilities, I often use functions or procedures to solve some complex tasks and run them directly in DBISQL, without developping a particular front end. Often enough, I then use MESSAGE TYPE ACTION TO CLIENT to show a warning or error message, say, when input parameters are not reasonable or when no fitting data is found or whatever (with actual messages being more helpful, I guess...):

alt text

Now and then, it would be handy if I could ask the user to give an answer, as well, say whether the procedure should continue when something unexpected has been found, or to confirm the further execution. I'm thinking of a very simple yes/no choice similar to the WinAPI MessageBox() function, but more restricted, say an enhancement to the MESSAGE statement as the following non-existing (and probably poorly worded) QUESTION INTO clause:

MESSAGE expression
   | CLIENT [ FOR { CONNECTION conn-id-number [ IMMEDIATE ] | ALL } ] 
   | [ EVENT | SYSTEM ] LOG }
   [ DEBUG ONLY ] ]

The message statement would then show a messagebox-style dialog with a yes/no button and would return the answer into the specified variable as 1 / 0 or whatever. I guess a binary choice would be sufficient, and it would not necessarily require a specification which answer is the default choice - you could simply adapt the message text accordingly.

I'm aware that one can partly avoid such questions by adding a further procedure parameter like "ResultOnError bit" but then a user would need to answer possible questions beforehand, which might be risky.

FWIW: I have not tried to use an external function to call the WinAPI MessageBox() function or the like because I suspect it would not show up on the client but on the server (or might be suppressed fully when running as a service?).

asked 17 Mar '16, 11:38

Volker%20Barth's gravatar image

Volker Barth
accept rate: 32%

edited 17 Mar '16, 11:42

Be the first one to answer this question!
toggle preview

Follow this question

By Email:

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



Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text]( "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:


question asked: 17 Mar '16, 11:38

question was seen: 451 times

last updated: 17 Mar '16, 11:42