La gestion des erreurs en sql server
Fermé
halima15
Messages postés
167
Date d'inscription
dimanche 15 novembre 2009
Statut
Membre
Dernière intervention
21 avril 2010
-
1 janv. 2010 à 21:54
halima15 Messages postés 167 Date d'inscription dimanche 15 novembre 2009 Statut Membre Dernière intervention 21 avril 2010 - 4 janv. 2010 à 03:10
halima15 Messages postés 167 Date d'inscription dimanche 15 novembre 2009 Statut Membre Dernière intervention 21 avril 2010 - 4 janv. 2010 à 03:10
A voir également:
- La gestion des erreurs en sql server
- Ps3 media server - Télécharger - Divers Réseau & Wi-Fi
- Filezilla server - Télécharger - Téléchargement & Transfert
- Sql server recovery - Télécharger - Gestion de données
- Logiciel gestion photos - Guide
- Universal media server - Télécharger - Divers Utilitaires
1 réponse
holow1
Messages postés
680
Date d'inscription
lundi 21 décembre 2009
Statut
Membre
Dernière intervention
7 décembre 2012
71
2 janv. 2010 à 01:04
2 janv. 2010 à 01:04
bonjour,
voici un exemple d'un cour(.CMH) complet en anglais pour sql server 2005
As shown in the example, you can use the following functions to return information about the error caught by a CATCH block:
ERROR_MESSAGE( )
Diagnostic information about the error. These messages often contain substitution variables that allow specific information, such as the database object that caused the error, to be included in the message.
ERROR_NUMBER( )
The unique error number of the error. The ERROR_NUMBER( ) function returns the last error number every time it is called. This is different from @@ERROR, which works only if it immediately follows the error or is the first statement in the CATCH block.
ERROR_SEVERITY( )
The severity level of the error. Error severities range from 0 to 24. Error levels 0 to 9 are warnings or informational.
ERROR_STATE( )
The state of the error. A state code uniquely identifies specific conditions that cause errors with the same error number.
c'est vous étiez intéresse passer ton Email ^_^
voici un exemple d'un cour(.CMH) complet en anglais pour sql server 2005
USE AdventureWorks BEGIN TRY UPDATE HumanResources.Employee SET Gender = 'X' WHERE EmployeeID = 1; END TRY BEGIN CATCH SELECT ERROR_NUMBER( ) ErrorNumber, ERROR_STATE( ) ErrorState, ERROR_SEVERITY( ) ErrorSeverity, ERROR_MESSAGE( ) ErrorMessage; END CATCH
As shown in the example, you can use the following functions to return information about the error caught by a CATCH block:
ERROR_MESSAGE( )
Diagnostic information about the error. These messages often contain substitution variables that allow specific information, such as the database object that caused the error, to be included in the message.
ERROR_NUMBER( )
The unique error number of the error. The ERROR_NUMBER( ) function returns the last error number every time it is called. This is different from @@ERROR, which works only if it immediately follows the error or is the first statement in the CATCH block.
ERROR_SEVERITY( )
The severity level of the error. Error severities range from 0 to 24. Error levels 0 to 9 are warnings or informational.
ERROR_STATE( )
The state of the error. A state code uniquely identifies specific conditions that cause errors with the same error number.
c'est vous étiez intéresse passer ton Email ^_^
4 janv. 2010 à 03:10