J
Jim
Hi,
I've got an A2K mdb with a SQL Server 7 backend. Most RI is enforced using
relationships, which is fine, but I also use triggers for enforcing
"special" rules that can't be handled by check constraints. The scenario
that I'm having a problem with is when a user enters information into a form
that violates a business rule on the server, the error message that is shown
is very confusing to users, e.g.:
ODBC--update on a linked table 'tblAccount' failed.
[Microsoft][ODBC SQL Server Driver][SQL Server]A company can only have a
single company account! (#50000)
The actual message from the trigger is buried in the text of the error, and
since users don't read, they never look at the actual message. I would like
to have some clean way of capturing this message before it's displayed,
stripping out all of the junk that just makes things more confusing, and
showing only the pertinent message. The Error event doesn't help, because
all it tells you is the error number, not the error message itself, and
there are no errors in the DBEngine.Errors collection when the Error event
fires. Short of going to unbound forms, is there any way to capture these
messages?
Thanks, Jim
I've got an A2K mdb with a SQL Server 7 backend. Most RI is enforced using
relationships, which is fine, but I also use triggers for enforcing
"special" rules that can't be handled by check constraints. The scenario
that I'm having a problem with is when a user enters information into a form
that violates a business rule on the server, the error message that is shown
is very confusing to users, e.g.:
ODBC--update on a linked table 'tblAccount' failed.
[Microsoft][ODBC SQL Server Driver][SQL Server]A company can only have a
single company account! (#50000)
The actual message from the trigger is buried in the text of the error, and
since users don't read, they never look at the actual message. I would like
to have some clean way of capturing this message before it's displayed,
stripping out all of the junk that just makes things more confusing, and
showing only the pertinent message. The Error event doesn't help, because
all it tells you is the error number, not the error message itself, and
there are no errors in the DBEngine.Errors collection when the Error event
fires. Short of going to unbound forms, is there any way to capture these
messages?
Thanks, Jim