(ODBC) Connection Drop Handling

B

Babbage

connection failed
sqlstate: `01000`
sql server error: 2
microsoft odbc sql server drive][dbnetlib]connectionopen (Connect()).
Connection failed:
SQLState: '08001'
sql server error: 17
miccrosoft][odbc sql server driver][dbnetlib]sql server does not exist or
access denied.

.....

Pretty standard error message - I got that one by turning off my sql server
then pushing my access application to connect to it.

Its not a problem.

What I am trying to do is trap (?at a low level?) any database `errors` that
might occure - e.g. when a connection is lost between my ms access front end
and sql server (over odbc) back end.

Id rather replace lots of failing controls on forms, or/and odbc error
messages that confuse the end user, with a nice `somethings gone wrong,
shutting down gracefully` message.

Of course these errors may occure outside of custom vba code, so you cant
error trap this using standard `on error` bits of code.

I also don't want to be running any `behind the scenes poll the db to see if
its up` code, as its reliability is entirly dependant on it executing during
a `problem, but rest of application hasnt noticed yet` time period.

any ideas?

Many thanks

martin
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top