关于Windows应用程序中的数据集 [英] about dataset in windows application

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

问题描述

我从数据库中检索一些数据并将其保存在数据集中。有一天后,我想检查数据集中的这些数据是否已更新。我是如何检查的?

I retrieve some data from database and keep it in a dataset. After some day I want to check that this data in dataset is updated or not. How I check it?

推荐答案

您需要正确告诉我们,只有其他人可以帮助您。尝试详细说明您的需求,告诉我们您做了什么以及您遇到了什么。没有你的正确要求,很难帮助你,无论如何我只是从你理解的问题中给你一些想法。



What is your need tell correctly, then only others can help you. Try to elaborate your need, tell us what you did and where you stuck. Without your proper requirements it will be hard to help you, anyway i am just giving you some idea from your question which i understand.

DataTable dt = new DataTable();
dt = ds.Tables["FooTable"];

foreach (DataRow dr in dt.Rows)
{
    MessageBox.Show(dr["Column1"].ToString());
}





要连续读取特定单元格:





To read a specific cell in a row:

int rowNum // row number
string columnName = "DepartureTime";  // database table column name
dt.Rows[rowNum][columnName].ToString();





也可以参考这些数据集示例

数据集说明 [ ^ ]

使用数据集 [ ^ ]

键入数据集一步一步教程 [ ^ ]

DataGridView with Detail Edit Form - VS 2005 [ ^ ]



also refer these for Dataset examples
Dataset Description[^]
Working with Dataset[^]
Typed Dataset step by step tutorial[^]
DataGridView with Detail Edit Form - VS 2005[^]


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

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