当我的应用程序因重复键而抛出OleDbException时,我需要向用户显示一条友好的消息。我正在捕捉OleDbException然后查看它的ErrorCode,如果它是 - 2147467259 然后我显示自己的消息。我的问题是:
1-我能肯定吗以上错误代码仅在重复键时产生?
2-是否有字典将OleDbException错误代码与导致它们的案例联系起来?
谢谢
解决方案
亲爱的,
您可以从以下链接获取列表
support.microsoft/default。 aspx?scid = kb; EN-US; q168354& GSSNB = 1
问候,
Wasif Ahmad
I need to show the user a friendly message when my application throws an OleDbException because of duplicate keys. I am catching the OleDbException and then looking at its ErrorCode, if it was -2147467259 then I display my own message. My questions are:
1- Can I be sure that the above error code is only produced upon duplicate keys?
2- Is there a dictionary to relate OleDbException error codes to the cases causing them?
Thanks
解决方案Dear,
You can get the list from the following link
support.microsoft/default.aspx?scid=kb;EN-US;q168354&GSSNB=1
Regards,
Wasif Ahmad
更多推荐
OleDbException错误代码
发布评论