SqlError.Number descriptions

前端 未结 2 788
遥遥无期
遥遥无期 2021-01-19 12:43

Where i can get all the descriptions of the SqlError.Number collection? This are throwed by SqlException

相关标签:
2条回答
  • 2021-01-19 12:50

    From sys.messages in your database. Since you can add your own errors in SQL Server (via sp_addmessage), there is no definitive list. Also, the pre-defined list (below 50000) can differ (grow) per database version.

    (or do you just mean .Message on each SqlError instance?)

    0 讨论(0)
  • 2021-01-19 12:55
    SELECT Description FROM master..sysmessages  
    
    0 讨论(0)
提交回复
热议问题