I've developed an ADP application using SQL2000 as the backend, but I'm
having problems trapping constraint validation errors in my bound forms.
I'm trying to resolve the following 2 issues:
1. When saving an edited record, I can only trap Error 2757 through the
form's Error event, but cannot retrieve any further info about the error
either with the ADO Errors collection or the VBA Err object. Error 2757
occurs regardless of whether the problem was caused by skipping a NotNull
field, violating a Check constraint or violating a UniqueIndex constraint.
2. When closing a form after adding a new record, the record is saved
correctly if no constraints have been violated (as expected). However if
any constraints have been violated, the form simply closes without saving,
and no error is generated.
I'd like to trap these errors at the client and respond appropriately. I'm
specifically hoping to avoid the following:
A: Unbinding all my bound forms (25 odd forms) and managing navigation
etc. programmatically.
B: Duplicating all my business rules throughout the UI.
All bound forms are based on views and SPs. I'm currently using the
standard ADP connection object (MSDataShape service).
Can anyone point me in the right direction?
Thanks in advance,
Phill Kenny
NB: I've cross-posted on: microsoft.public.access.odbcclientsvr;
microsoft.public.access.externaldata