DataRow row1 =dsq.Tables["little"].NewRow();
int col = ds2.Tables[0].Rows.Count;

for(int i=0;i<col;i++)
{
row1[0]=ds2.Tables[0].Rows[i][0].ToString();//行驶路线
row1[1]=ds2.Tables[0].Rows[i][1].ToString();//货物数量
row1[2]=ds2.Tables[0].Rows[i][2].ToString();//货物体积
row1[3]=ds2.Tables[0].Rows[i][3].ToString();//货物重量
row1[4]=ds2.Tables[0].Rows[i][4].ToString();//接单日期
row1[5]=ds2.Tables[0].Rows[i][5].ToString();//通知日期
row1[6]=ds2.Tables[0].Rows[i][6].ToString();//发运日期
row1[7]=ds2.Tables[0].Rows[i][7].ToString();//残损数量
dsq.Tables["little"].Rows.Add(row1);
}
这段代码是将弱类型的DATASET填充到强类型DATASET里面,但是执行到第二行的时候就报错,大家帮我看看谢谢