如何解决位置0没有行 [英] How to resolve there is no row at position 0

查看:68
本文介绍了如何解决位置0没有行的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

位置0没有排

如何重新编码---





< ; pre lang =C#> if(Session [& quot; remark& quot;]。ToString()==& quot; 0& quot;)

{

会话[& quot;评论& quot;] =& quot; 1& quot ;;

尝试{

SendleaveDetailS();

}

catch(例外情况)

{



}

}< / pre>



我尝试过:



i希望解决异常我提到代码所以请帮助我

there is no row at position 0
How to Reslove Code---


<pre lang="C#">if (Session[&quot;remark&quot;].ToString() == &quot;0&quot;)
{
Session[&quot;remark&quot;] = &quot;1&quot;;
try {
SendleaveDetailS();
}
catch(Exception Ex)
{

}
}</pre>

What I have tried:

i want to resolve exception i have mention code so please help me

推荐答案

你无法'解决'异常:你抓住它并处理,在catch块中,错误。

如果'在0位没有行',那么你的查询可能会失败。根据您的情况,您可以告知用户失败,或终止应用程序或攻击海盗或其他......
You cannot 'resolve' the exception: you catch it and handle, in the catch block, the error.
If there is 'no row at position 0' then you probably have a failed query. Depending on your scenario you could inform the user of the failure, or terminate the application or attack the pirates or whatever...


这篇关于如何解决位置0没有行的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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