Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Problem sending RAISERROR message from trigger to Access

0 views
Skip to first unread message

GUILBAUL

unread,
Jul 9, 1998, 3:00:00 AM7/9/98
to
I have a trigger on one of my SQL Server tables that generates a user defined
error if the condition is not met.

How do I get Access to show the error in a msgbox? Right now, if the rule is
violated, I get an ODBC error (3155), and my user defined error only shows up
after I close the form.

I AM DESPERATE!!!!!!!! HELP!!!!!!!!!!

Pete Cousins

unread,
Jul 10, 1998, 3:00:00 AM7/10/98
to
I have the same problem on a bound form. One solution (which I
dislike), is to unbind the form and then open a recordset
programmatically to update the data. If an error occurs then there are
at least 2 (I think 3) errors in the errors collection. I think it's
the second error you need (i.e. errors(1).description).
Another solution is to also put the validation in the form.
It might be possible to use the OnError event of the form to get at
the second error message - haven't had time to try it yet

Pete cousins
IT Consultant
Lorien plc
pete dot cousins at ukonline dot co dot uk

0 new messages