Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 540275
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T10:13:25+00:00 2026-05-13T10:13:25+00:00

We are converting our application from using Sql Server Express (let’s call this version

  • 0

We are converting our application from using Sql Server Express (let’s call this version 3) to Sql Server Compact Edition (let’s call this version 4). I am trying to make sure that upgrades from previous versions (versions 1 and 2) are the same in the new product (version 4) as the old (version 3). The upgrade code had to be rewritten for various reasons.

I’m creating a quick test application that will compare a version 3 Sql Server Express database and a version 4 Sql CE database. If the conversion logic is good, the databases should be exactly equivalent–same tables, same columns, same row values.

It would seem to me that there should be an easy way to do this using DataTable.Merge and DataTable.GetChanges, but I’m not having success. If rows exist in the version 3 database and not in the version 4 database, the GetChanges still returns null. If there are changes to the same rows (based on the primary key, which is a Guid), GetChanges still returns null.

string selectSql = String.Format("SELECT {0} FROM {1}", String.Join(", ", columns.ToArray()), tableName);

var expressAdapter = new SqlDataAdapter(selectSql, expressConnection);
DataTable expressTable = new DataTable();
expressAdapter.Fill(expressTable);
expressTable.PrimaryKey = new DataColumn[] { expressTable.Columns[tableName + "ID"] };

SqlCeConnection ceConnection = new SqlCeConnection(this.SqlServerCeConnectionString);
var ceAdapter = new SqlCeDataAdapter(selectSql, ceConnection);
DataTable ceTable = expressTable.Clone();
ceAdapter.Fill(ceTable);

expressTable.Merge(ceTable);
return expressTable.GetChanges(); // this is null even when the expressTable has rows that do not exist in ceTable.

Am I using Merge and GetChanges in a way too far removed from their intended use? If so, other options would be welcome.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-13T10:13:25+00:00Added an answer on May 13, 2026 at 10:13 am

    I tried to do something similar sometime ago, but eventually it didn’t work, because AcceptChanges was called on rows added by Merge, so they were all in unmodified state, so GetChanges returned null…

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 509k
  • Answers 509k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer Finally I have figured it out myself! "options" are used… May 16, 2026 at 4:48 pm
  • Editorial Team
    Editorial Team added an answer Strictly speaking your algorithm doesn't consume power. Presumably you have… May 16, 2026 at 4:48 pm
  • Editorial Team
    Editorial Team added an answer Firebug is great, but Safari provides its own built-in development… May 16, 2026 at 4:48 pm

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Related Questions

I'm currently converting our company database application from VB to ASP.NET. This is pretty
I have a legacy VB6 application that was built using MSDE. As many client's
We're using an old application that stores dates in C / Unix format. C
We are troubleshooting a SQL Server 2005 connection issue on a closed-source third-party ASP.NET
Setup: I'm creating a .NET WinForms application in C# to allow our technical support
I am converting some docs to pdf using wkhtmltopdf (currently using perl and the
We're converting some .NET 3.5 code to Java (Android). This Java code gives the
I am converting some environment variables to property sheets for some C++ projects. This
I'm currently converting some legacy code to create PDF files using iTextSharp. We're creating
I am having a problem converting a value to int. I ran this query

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.