OleDbException错误代码 [英] OleDbException error codes

查看:234
本文介绍了OleDbException错误代码的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我的应用程序因重复键而抛出OleDbException时,我需要向用户显示一条友好的消息。我正在捕捉OleDbException然后查看它的ErrorCode,如果它是 - 2147467259 然后我显示自己的消息。我的问题是:


1-我能肯定吗以上错误代码仅在重复键时产生?


2-是否有字典将OleDbException错误代码与导致它们的案例联系起来?


< font face ="Times New Roman"size = 3>


谢谢

解决方案

亲爱的,



您可以从以下链接获取列表



http://support.microsoft.com/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

 

http://support.microsoft.com/default.aspx?scid=kb;EN-US;q168354&GSSNB=1

 

Regards,

Wasif Ahmad

 


这篇关于OleDbException错误代码的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆