Link to home
Start Free TrialLog in
Avatar of jdana
jdanaFlag for United States of America

asked on

MS Access - Trying to intercept SQL Server unique index error with error-trapping

I dropped a unique index on an INT column in a SQL Server 2008 table.  The index does its job, but it would be nice to present the Access 2007 front-end user with an error message that's a little friendlier than the following:

"Cannot insert duplicate key row in object 'dbo.blabla..' with unique index 'Idx_blablabl'. The statement has been terminated at..."

I could put a little code under the hood in Access under the corresponding field's Before_Update event to check for unique values, but I'd like to simply error trap the error thrown by SQL Server.  Suggestions?
ASKER CERTIFIED SOLUTION
Avatar of danishani
danishani
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of jdana

ASKER

Thanks!