Hi,
How to find last update records in table, is possible to check it dataset?
How to get check last update records in dataset ?
1 Answer
Know the answer? Post it. Somebody with the same question will find it here.
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend4days leftRegister
Sandeep Singh ShekhawatRank #147 · 15.6K reputationPosted Oct 22, 2012, 10:31 PM EDT
There is not straightforward way to get last update record So I will suggest some point:
1. create a column in table like lastUpadte and write code like
SqlCommand cmd = new SqlCommand("select max(lastUpadte) from employee" , conn);
SqlDataReader reader = cmd.ExecuteReader();
while(reader.Read())
{
Console.WriteLine(reader["Name"]);
}
2. Create an timestamp column and use it to get updated data:
http://msdn.microsoft.com/en-us/library/aa260631(v=sql.80).aspx
Thanks
Sandeep