Click here to Skip to main content
15,893,487 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
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?
Posted
Comments
Naz_Firdouse 30-Jul-13 6:13am    
please explain in detail
davi_p 30-Jul-13 6:32am    
I retrieve some data from database and keep it in a dataset. After some day I want to check that which data I retrieved from database is same as before stored in dataset currently now.
I want how I check that dataset data is updated or not updated.
Am I clear?
Sadique KT 30-Jul-13 6:58am    
Once You close your application ..you will lose the data in dataset..
Better you keep your table data in a temporary table in database itself. and compare it with original..
Rajan from Thiruvananthapuram 30-Jul-13 6:20am    
Dataset is a collection of data tabel in database
Manikandan Sekar 30-Jul-13 7:00am    
What is your need tell correctly, then only others can help you.

1 solution

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:

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


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

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900