Celebrate National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

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

Posted on 2012-04-04
2
Medium Priority
?
417 Views
Last Modified: 2012-04-24
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?
0
Comment
Question by:jdana
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 12

Accepted Solution

by:
danishani earned 2000 total points
ID: 37809599
You may look into below similar thread, to find your answers/ methods for doing so:
http://www.sqlservercentral.com/Forums/Topic300275-131-1.aspx

or when using an ODBC:
http://support.microsoft.com/?id=209855
0
 

Author Closing Comment

by:jdana
ID: 37887861
Thanks!
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

You need to know the location of the Office templates folder, so that when you create new templates, they are saved to that location, and thus are available for selection when creating new documents.  The steps to find the Templates folder path are …
Access developers frequently have requirements to interact with Excel (import from or output to) in their applications.  You might be able to accomplish this with the TransferSpreadsheet and OutputTo methods, but in this series of articles I will di…
Basics of query design. Shows you how to construct a simple query by adding tables, perform joins, defining output columns, perform sorting, and apply criteria.
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…

730 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question