SQLGetDiagRec returns a native error code. Is there anywhere an overview of the error codes of SQL Server 2012? I couldn\'t find anything on MSDN.
I found the codes for MS SQL Server 2008 R2, but most of them are true for the later versions: http://technet.microsoft.com/en-us/library/cc645603(v=sql.105).aspx