DifferencesSummary and ResultsStore disagree

Automate and integrate using the SQL comparison API

DifferencesSummary and ResultsStore disagree

Postby Rodarin » Fri Sep 30, 2011 3:52 pm

I ran a comparison on the "same" table in two different databases, one of which has had a single column of a single record modified. The DifferencesSummary.DifferenceCount() method of the TableDifference returns 1, and the In1 member of the DifferencesSummary has a value of 1 (which seems incorrect, as I simply modified a row contained in both).

When I look at the ResultsStore member of the TableDifference, it reports a RowCount of 0, and calling GetReader() or GetReader(Row.RowType.In1) on that ResultsStore gives a RowCount of 0.

If the TableDifference.DifferencesSummary knows there is a difference, why can't I get it?
Posts: 2
Joined: Fri Sep 30, 2011 3:43 pm

Never mind...

Postby Rodarin » Fri Sep 30, 2011 4:28 pm

Never fails that you find the answer to your own question after you have given up and asked the world for help. The ComparisonSession.CompareDatabases was called with SessionSettings.IncludeDifferentRecords only, hence the result. Odd, though, that the DifferencesSummary still lets me know about In1 and In2.
Posts: 2
Joined: Fri Sep 30, 2011 3:43 pm

Postby james.billings » Mon Oct 03, 2011 11:24 am

Glad to hear you worked it out- I'm not sure why the two would differ like that off the top of my head, but they are two different things of course. I also saw recently that some of the properties in the DifferencesSummary are marked as obsolete now, so that may also be something to do with it.

Let us know if you have any further trouble though!
Posts: 1122
Joined: Wed Jun 16, 2010 10:10 am
Location: Red Gate

Return to SQL Comparison SDK Previous Versions

Who is online

Users browsing this forum: No registered users and 0 guests