SQL Server not reachable at start-up: error 08001, then a MESSAGE or STOP locks up the program

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

  1. 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.
  2. 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.
  3. What worked for him: a special error window that shows the error and then does a RETURN, with no MESSAGE or STOP.
  4. A second poster reported the same problem and said MessageBox has a property to keep an entry out of the log: ThisMessageBox.OnlyOnce.LogMessages = 0 before 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 LogMessages property 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.