How to compare two table contents?

G

Guest

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,578
Members
45,052
Latest member
LucyCarper

Latest Threads

Top