Velocity Reviews

Velocity Reviews (http://www.velocityreviews.com/forums/index.php)
-   ASP .Net (http://www.velocityreviews.com/forums/f29-asp-net.html)
-   -   How to compare two table contents? (http://www.velocityreviews.com/forums/t93354-how-to-compare-two-table-contents.html)

=?Utf-8?B?U2hhdw==?= 12-27-2004 07:09 PM

How to compare two table contents?
 
Our database is constantly updated (input data) from another DB, and
sometimes it crashes our ASP.NET applications. My boss told me to write a DB
utility app to check DB and make sure all apps are still running.

The first step of few checks is to compare current DB tables with
yesterday’s tables. I store yesterday’s tables at a XML file (DB is
maintained by another guy, and certainly they don’t want me to make back copy
for few tables in DB everyday).

I thought it’s trivial, and just do loop and compare two XML DOM
(XmlDocument) objects and make a new one. But the algorithm is more complex
than I thought. The new rows can be inserted or deleted based on primary key.

So, my question is: Is there a sample code to compare two tables (either
DataTable in DataSet, or XmlDocument)?

Another question is: Can I set color for individual cell in DataGrid UI,
because I want to use different color to show new, deleted or modified field
dynamically?

Thanks
Shaw



All times are GMT. The time now is 06:28 PM.

Powered by vBulletin®. Copyright ©2000 - 2014, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.