Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

How to get violated constraint name and the table name for which the constraint violated in SQL Server 2005 Expand / Collapse
Author
Message
Posted Wednesday, May 28, 2008 6:28 AM
Old Hand

Old HandOld HandOld HandOld HandOld HandOld HandOld HandOld Hand

Group: General Forum Members
Last Login: 2 days ago @ 1:22 AM
Points: 330, Visits: 962
Hi,

I have a task where in i need to send the constraint and the table name which got violated in a set of DML Statements in a Store Procedure,

So please help me how to get violated constraint name and the table name for which the constraint violated in SQL Server 2005


With Regards
Dakshina Murthy
Post #507616
Posted Wednesday, November 17, 2010 12:52 PM
Grasshopper

GrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopper

Group: General Forum Members
Last Login: Tuesday, June 10, 2014 4:29 AM
Points: 22, Visits: 94
Maybe you could use Try/CATCH
[url=http://weblogs.asp.net/pjohnson/archive/2010/10/04/sql-server-2005-2008-s-try-catch-and-constraint-error-handling.aspx][/url]
Post #1022419
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse