数据传输到一个表到另一个表 [英] data transfer to one table to another table

查看:57
本文介绍了数据传输到一个表到另一个表的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

hi

iam试图将一个表中的数据插入到另一个表中.
iam使用以下方法.
但在源表中在运行时显示为空.

所以请让我知道如何访问源表中的数据.


foreach(sourceTable.Rows中的DataRow dr)
{
destinationTable.ImportRow(dr);
}

hi

iam trying to insert data one table to another table.
iam using below method.
but in the source table show empty at the run time.

so please give me idea how to access the data in to my source table.


foreach (DataRow dr in sourceTable.Rows)
{
destinationTable.ImportRow(dr);
}

推荐答案

您可以使用copy方法将一个表的数据复制到另一个表中
e.e destinationtable = soucretable.copy()
You can use the copy method to copy the data of one table to other
e.e destinationtable=soucretable.copy()


这篇关于数据传输到一个表到另一个表的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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