I'm looking for a listing of possible error number with the error message from SDAC which can be show in my program.
Something which could look like this:
0x80040E4D -2147217843 Authentication failed
I d'like to change some error message to be more friendly for the user. So if I could have the whole list, I could figure which one I should change before the user sees it.
I'm pretty sure the message error comes from SDAC and not oledb.
Error number comes from Oledb. I might be wrong...
If the whole thing comes from OleDb, where could I find an accurate list for sql server 2008 ?
SDAC Ole db error listing
Hello,
We have got the text and the code of the error from OLEDB.
You can view the full list of errors by executing the following query:
and use the following code to show your own message, for example:
We have got the text and the code of the error from OLEDB.
You can view the full list of errors by executing the following query:
Code: Select all
select * from sys.messages;
Code: Select all
uses OleDBAccess;
........
try
Connect;
except
on E:EMSError do
case e.MSSQLErrorCode of
XXXX: ShowMessage('');
YYYYY: ShowMessage('');
end;
end;