[Last Call] Learn about multicloud storage options and how to improve your company's cloud strategy. Register Now

x
?
Solved

6232B_12 Handling Errors in T-SQL Code: What's in an Error?

Posted on 2011-09-16
5
Medium Priority
?
289 Views
Last Modified: 2012-05-12
Hi experts, i am reading about  What's in an Error? but i do not understand

State: Value used to determine the location in code at which an error occurred
can you give me an example or explain me more details?
0
Comment
Question by:enrique_aeo
[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
  • 3
5 Comments
 
LVL 60

Expert Comment

by:Kevin Cross
ID: 36552993
Hi. Think about how you would "locate" code visually. You would use the fact that code is essentially on individual lines, right? http://msdn.microsoft.com/en-us/library/ms178600.aspx ;)
0
 

Author Comment

by:enrique_aeo
ID: 36552998
this is the defintion
"Some error messages can be raised at multiple points in the code for the Database Engine. For example, an 1105 error can be raised for several different conditions. Each specific condition that raises an error assigns a unique state code.

When you are viewing databases that contain information about known issues, such as the Microsoft Knowledge Base, you can use the state number to determine whether the recorded issue is the same as the error you have encountered. For example, if a Knowledge Base Article describes an 1105 error that has a state of 2 and the 1105 error message you received had a state of 3, the error probably has a different cause than the one reported in the article.

A Microsoft support engineer can also use the state code from an error to find the location in the source code where that error code is being raised. This information might provide additional ideas on how to diagnose the problem."
http://msdn.microsoft.com/en-us/library/ms165761.aspx

BUT I DO NOT UNDERSTAND
0
 
LVL 60

Expert Comment

by:Kevin Cross
ID: 36553069
I am sorry. I read that as "state the value used to determine the location..." i.e., error line or line number. :) I will try again now that I see that is about State within error message. When I locate the reference of all 127 states, I will post. At least ERROR_STATE can be 1 - 127 identifying at what stage the error occurred.
0
 
LVL 60

Accepted Solution

by:
Kevin Cross earned 800 total points
ID: 36553077
And, I probably won't find a list *smile* -- state tells the source in SQL Server code that error generated from. As the description suggests, this information is helpful to Microsoft Engineers. You will probably see a number of errors are 1 because they only can get generated from one place. If however, there are multiple places or ways an error can be generated, the state allows the Engineers to pinpoint the exact source.
0
 
LVL 8

Assisted Solution

by:Ghunaima
Ghunaima earned 200 total points
ID: 36553585
http://msdn.microsoft.com/en-us/library/ms180031.aspx

Studying this may help you.  also read about other ERROR-... () functions which are present in Refrence section of the page you specified.
0

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Question has a verified solution.

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

In SQL Server, when rows are selected from a table, does it retrieve data in the order in which it is inserted?  Many believe this is the case. Let us try to examine for ourselves with an example. To get started, use the following script, wh…
In this article we will get to know that how can we recover deleted data if it happens accidently. We really can recover deleted rows if we know the time when data is deleted by using the transaction log.
How to fix incompatible JVM issue while installing Eclipse While installing Eclipse in windows, got one error like above and unable to proceed with the installation. This video describes how to successfully install Eclipse. How to solve incompa…
Want to learn how to record your desktop screen without having to use an outside camera. Click on this video and learn how to use the cool google extension called "Screencastify"! Step 1: Open a new google tab Step 2: Go to the left hand upper corn…

656 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