数据表或数据集 [英] Datatable or Dataset

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

问题描述

是否可以更改数据表或数据集中的数据类型

Is it poosible to change datatype in datatable or dataset

推荐答案

已填充数据表不会在模式中进行更改.

但是您可以执行以下操作:
1.制作一个新的数据表

2.使用datatable的Clone方法创建具有相同结构的数据表并对该列进行更改.

3,最后使用datatable的ImportRow方法向其中填充数据.

希望这对您有所帮助:)
Filled Datatables do not entertain a change in the schema.

But you can do this:
1.Make a new datatable

2.Use datatable''s Clone method to create the datatable with the same structure and make changes to that column.

3.In the end use datatable''s ImportRow method to populate it with data.

hope this helps :)


在这里您

如何在.NET/C#中更改数据列类型 [ ^ ]
Here you go

How to change a datacolumn type in .NET/C#[^]


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

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