Wrox Programmer Forums
Go Back   Wrox Programmer Forums > SQL Server > SQL Server 2005 > SQL Server 2005
|
SQL Server 2005 General discussion of SQL Server *2005* version only.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the SQL Server 2005 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 May 18th, 2007, 02:25 AM
Registered User
 
Join Date: Dec 2006
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Default Retrieve previous error details

Hi all.
How to get the previous error number and error description in SQL Server using T-SQL Statements ?

 
Old May 18th, 2007, 04:17 AM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 2,480
Thanks: 0
Thanked 1 Time in 1 Post
Default

What do you mean by Previous error here? Is that the error that you got just while running a t-sql statement? If so just after the error that occured you will have @@ERROR holding the error number. The error message is constructed using Sysmessages system table for the @@ERROR number.

_________________________
- Vijay G
Strive for Perfection





Similar Threads
Thread Thread Starter Forum Replies Last Post
Error 2001 You canceled the previous operation RayL Access VBA 3 December 8th, 2006 03:00 PM
"you canceled the previous operation" error Totenkopf Access VBA 2 June 14th, 2006 02:48 PM
how to fix the error : Exception Details: System.D khaink ASP.NET 1.0 and 1.1 Basics 2 October 9th, 2005 12:24 AM
Error 2001: You canceled the previous operation RayL Access VBA 3 May 27th, 2005 07:40 AM
/proc details? jrichemont BOOK Beginning Linux Programming, 3rd Edition 1 April 13th, 2004 10:46 AM





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