【求助】dataAdapt填充指令执行时自动退出,无法执行剩下的程序
这是一个按钮触发后的指令。调试的时候发现的问题,本来想生成一个矩阵的。为什么运行到fill那就突然返回了?还有就是最后四行什么用,是不是对生成的矩阵重新构成一个新的矩阵?最后两行的0和1代表什么意思?
请不吝赐教,谢谢
if (radioButton2.Checked)
{ Int32 selectedRowCount = checkedListBox1.SelectedItems.Count;
string fields = "";
if (selectedRowCount > 0)
{
for (int b = 0; b < checkedListBox1.CheckedItems.Count; b++)
{
fields += "," + ee[b];
}
fields = fields.Substring(1);
}
ArrayList myarraylist = new ArrayList();
string conStr = "user id=system;password=manager;data source=oradb";
OracleConnection con = new OracleConnection(conStr);
con.Open();
DataSet myset1 = new DataSet();
DataTable mytable1 = new DataTable();
string pici1_select = "select " + fields + " from HISTORY." + biao + " where sampleTime>=20 and sampleTime<=60";
OracleDataAdapter myadapter1 = new OracleDataAdapter(pici1_select, con);
myadapter1.Fill(myset1, "database");//到这就截止了,下面的程序还没执行就自动返回了,这行程序貌似也没执行成功,因为断点运行时箭头直接没指到下一行就返回了。
double[,] data1 = new double[myset1.Tables[0].Rows.Count, myset1.Tables[0].Columns.Count];
for (int a = 0; a < myset1.Tables[0].Rows.Count; a++)
for (int b = 0; b < myset1.Tables[0].Columns.Count; b++)
{
data1[a, b] = Convert.ToDouble(myset1.Tables[0].Rows[a][b]);
}
string jjstr1 = tonewstrings(data1);
myarraylist.Add(jjstr1);
myarraylist.Add(data1.GetLength(0));
myarraylist.Add(data1.GetLength(1));