Applies to: Clarion 10 with CapeSoft MessageBox, as reported; the SQL Server version is not named.
Problem
The poster wanted a good way to test from inside the program whether the SQL Server database is available. Without a test the program got a file access error (08001), then "Halt: Disk Error", and then the program stopped.
Solution
- A DBExists example (a C10 app) was offered by one poster. The attachment is not in the archive text, so the technique is not recorded here.
- The poster's own cause: his MessageBox log (MessageLog) is a SQL table. With the server down, a MESSAGE or STOP wrote to that table and the program locked up.
- What worked for him: a special error window that shows the error and then does a RETURN, with no MESSAGE or STOP.
- A second poster reported the same problem and said MessageBox has a property to keep an entry out of the log:
ThisMessageBox.OnlyOnce.LogMessages = 0before the MESSAGE. The original poster did not say he tried it.
Caveats
- The thread does not show how the availability test itself is written.
- The
LogMessagesproperty is from one poster's own experience, not tested by the original poster. - One poster pointed out the test needs no MESSAGE or STOP; any technique that achieves the aim will do.
Today (2026)
Likely unchanged: a message that logs to the same unavailable server will fail the same way. Not re-tested.
Sources: Bob C. (Jul 2024, the question), Geoff B., Sean H. (Jul 2024) in softvelocity.clarion.databasedrivers.