473,426 Members | 1,867 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,426 software developers and data experts.

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

Nov 19 '05 #1
0 1801

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
by: Robin Siebler | last post by:
I have two directory trees that I want to compare and I'm trying to figure out what the best way of doing this would be. I am using walk to get a list of all of the files in each directory. I...
3
by: Peter | last post by:
Hi, I was wondering how do you compare variables that contain text strings in ASP. When I use the following If.. Then statement: If Rs("StyleNo") <> arrStyleNo(aCount) Then
5
by: Megan | last post by:
Hi everybody- I'm helping a friend with a music database. She has an old one and is creating a new one. She wants to compare records and fields in the old database with records and fields in the...
19
by: David zhu | last post by:
I've got different result when comparing two strings using "==" and string.Compare(). The two strings seems to have same value "1202002" in the quick watch, and both have the same length 7 which I...
1
by: bengamin | last post by:
Hi, I declare two ArrayList variables.How can I compare if the two ArrayList are Value Equal. Thanks! Ben
1
by: Beowulf | last post by:
I have a report laid out in Design View as shown at the end of this message. I have code that performs the following steps: 1. In main report's Report_Open(), DELETE any old rows in tblTOC for...
3
by: Riun | last post by:
I want to check if a row in the underlying table of my form, changed, so I created a second table, pasted all rows from underlying table in second table, and then want to check if the two tables are...
11
by: inpuarg | last post by:
I have 2 datatables. They are identical. I want to compare them by cell's content. They are all same. But dt1 == dt2 or dt1.GetHashCode() == dt2.GetHashCode() doesn 't work. There are big...
1
by: jimbob | last post by:
Hi all, Wondered if you could help me. I need to compare the row counts of 2 tables but can't work out how to do it, everything I've tried has failed. 1 table is database A and the other...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.