Wrox Programmer Forums
|
SQL Server 2000 General discussion of Microsoft SQL Server -- for topics that don't fit in one of the more specific SQL Server forums. version 2000 only. There's a new forum for SQL Server 2005.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the SQL Server 2000 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old July 19th, 2006, 07:30 AM
Authorized User
 
Join Date: Jul 2006
Posts: 14
Thanks: 0
Thanked 0 Times in 0 Posts
Default error handling in ms sql

hi,
i would like to know is there any error handling mechanism available in sqlserver.
for eg. if i want to enter a record only if the employee_id is not available in the table.
in oracle we have various exceptions, in .net we have try catch i would like to know such type of exception handler in ms sql.
thanks in anticipation
Raj
 
Old July 19th, 2006, 12:01 PM
Friend of Wrox
 
Join Date: May 2006
Posts: 246
Thanks: 0
Thanked 0 Times in 0 Posts
Default

yes, there is BEGIN TRAN and COMMIT TRAN / ROLLBACK TRAN together with @@ERROR variable.






Similar Threads
Thread Thread Starter Forum Replies Last Post
Database migration MS Access 2003 to MS SQL 2000 ayazhoda SQL Server 2000 3 April 23rd, 2007 11:38 AM
MS ACCESS 2003 FRONTEND AND MS SQL SERVER 2005 DB mohankumar0709 SQL Server 2005 3 March 23rd, 2007 12:48 AM
Error handling with SQL Server mike_remember SQL Server 2000 2 January 2nd, 2007 07:16 PM
C# handling SQL Server exceptions booksnore2 General .NET 3 September 16th, 2006 09:40 AM
error 22528 in MS sql server enterprise mang valuepac SQL Server 2000 1 December 3rd, 2003 04:05 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.