我们如何向DataSet添加新列并输入数据 [英] How can we add a new column to DataSet and enter the data

查看:118
本文介绍了我们如何向DataSet添加新列并输入数据的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



我有DataSet,里面有两个表(A和B)。我想在一个数据表A中添加一个新列(Type:DateTime),并从其他数据表B中加载该值(来自具有DateTime类型的列)。另外我想在添加到A之前更改DateTime的格式,即,如果B有格式mm / dd / yyyy hh:mi:ss然后在A中它应该是dd / mm / yyyy hh:mi:ss(只是一个例)。最简单的方法是什么。

解决方案

这是良好的综合指南 [ ^ ]



我希望有所帮助。

Hi,
I have DataSet with two tables(A and B) in it. I wants to add a new column (Type: DateTime) to one data table, A, and load the value from other data table, B, (from a column which has DateTime type). Also i wants to change the format of DateTime before adding to A, ie, if B has a format mm/dd/yyyy hh:mi:ss then in A it should be dd/mm/yyyy hh:mi:ss (just an example). What is the simplest way to do this.

解决方案

Here is a good comprehensive guide[^]

I hope that helps.


这篇关于我们如何向DataSet添加新列并输入数据的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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