4,5 5等位置没有排 [英] No row at position 4 5 6 etc

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

问题描述

我知道它被问了很多,而且我已经看了很多这个,但我给出的所有解决方案,但似乎没有什么工作适用于我的情况,所以我想发布我的解决方案,这是不起作用的 System.Data.dll中发生'System.IndexOutOfRangeException'类型的未处理异常



附加信息:位置16处没有行。我已经完成了调试数据库可视化器有行但它没有返回行...除了问题它只返回一个从12上索引更改



什么我试过了:



qdisplay.Text = quest_.Rows [questNo] [Question]。ToString()。ToLower(); //例外这里

radioButton1.Text = quest_.Rows [questNo] [Opt1]。ToString()。ToLower();

radioButton2.Text = quest_。行[questNo] [Opt2]。ToString()。ToLower();





questNo ++;



}

else

{

MessageBox.Show(empty);

}

i know its been asked alot and i have looked alot into this but all the solution that are given i have used but nothing seems to work for my case ,, so i thought to post my solution that is not working here"An unhandled exception of type 'System.IndexOutOfRangeException' occurred in System.Data.dll

Additional information: There is no row at position 16." i have done debugging database visualizer has rows but it is not returning rows ... in addition to problem it returns only one from 12 on index changed

What I have tried:

qdisplay.Text = quest_.Rows[questNo] ["Question"].ToString().ToLower(); // exception here
radioButton1.Text = quest_.Rows[questNo]["Opt1"].ToString().ToLower();
radioButton2.Text = quest_.Rows[questNo]["Opt2"].ToString().ToLower();


questNo++;

}
else
{
MessageBox.Show("empty");
}

推荐答案

我自己解决了...只是索引就像我已经从0增加到1而问题解决了
i have solved it myself ... just index was out like i have incremented it from 0 to one and problem solved


这篇关于4,5 5等位置没有排的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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