如何将DataTable中查询到的记录存入新建表中...
yeerh 2005-10-17 08:57:17 DataTable dt=new DataTable();
string strsele="姓名 like \'李%\'"; //构造字符串,查询姓"李"的记录
//将查询到的结果存入数组..
DataRow[] dr=this.dataSet31.Tables["Product"].Select(strsele);
for(int i=0;i<dr.Length;i++)
{
//将数组元素加入表...
dt.Rows.Add(dr[i]);//出错提示为:该行已经属于另一个表
}
请高手指点........