开发者

copy data from datatable to dataset.datatable

how to copy data from datatable to table in dataset i ry this but its readon开发者_开发问答ly property

ds.datatable1=newdt.copy


if datatable1 is a pre-existing datatable in your code and you want to fill it from another datatable newdt, then just doing datatable1 = newdt.copy should suffice.

Remove the ds.from your code. If you already have a reference to the datatable in your dataset i.e. dataTable1, then you can just copy into it directly as above


DataTable newdt = ds.datatable1;

newdt = Fill Datatable form DB;

ds.datatable1.TableName = "datatable1";
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜