读书人

C#中如何读取数据集中的某个表的某个单

发布时间: 2013-02-17 10:44:46 作者: rapoo

C#中怎么读取数据集中的某个表的某个单元格的Value?? 新手求指教
C#中怎么读取数据集中的某个表的某个单元格的Value??

为什么 我DataSet.tables["name"].rows[0].cells[0].value 这样不行呢??
[解决办法]
dataSet1.Tables["name"].Rows[0]["字段"].ToString()
[解决办法]
例如



lId = Convert.ToInt64(ds.Tables[0].Rows[0].ItemArray[0]);
lId_Ne = Convert.ToInt64(ds.Tables[0].Rows[0].ItemArray[1]);
lId_NF = Convert.ToInt64(ds.Tables[0].Rows[0].ItemArray[2]);
lType = Convert.ToInt32(ds.Tables[0].Rows[0].ItemArray[3]);
lData = Convert.ToInt64(ds.Tables[0].Rows[0].ItemArray[4]);
strName = ds.Tables[0].Rows[0].ItemArray[5].ToString();



[解决办法]
dataset里面你这个表叫name么?

读书人网 >C#

热点推荐