Issue with ADO.NET Sync Services and SQL Server 2000

Last Friday I had a battle and won. I was working in VS 2010 on an internal project that was being targeted for .NET 3.5. Everything was going good until I decided to be fancy. The application pulled down several tables that contain mostly static stuff such as states, counties, municipalities, old orders, products, etc. In total, it’s around 1GB of data. I decided to modify the datasets to support offline access. I thought that would improve performance as the data would be available locally and not on the SQL server. Little did I realize, the application that accessed the data was setup to read the column definitions from the database to display in the application and omitted columns on the client side.

So, after ADO.NET Sync services was enabled on those 6 tables, the application displayed the LastEditDate and EditDate. This was obviously causing confusion and a few errors within the application. I determined that it had to be removed. However, since Visual Studio 2010 connected to it remotely to make the changes, there was nothing installed on the database server. Besides adding the two columns above to the database, each table had a phantom table added that looked like tablename_Tombstone. Having never setup the Sync services before, I started by removing the 2 columns from each of the 6 tables and the Tombstone tables from the database. However, errors were occurring even more often now. Totally confused, I installed Red Gate’s SQL Compare (Great product!!!). I ran a comparison between the database and one of the database backups. Bing!

triggersforsyncservicesThe issue was that Sync Services creates triggers on each table to look at the inserts, updates, and deletes for each table and modifies the Tombstone table as needed. I then had to open up SQL Server 2000 Enterprise Manager (can’t believe that console is still legal) to find the triggers. Of course I had to Google, err I mean Bing it to find out how to manage triggers in SQL Server Enterprise Manager 2000. Everything is finally back to order again. Phew!

Published Monday, June 15, 2009 9:58 AM by Jason N. Gaylord

Comments

# Arjan’s World » LINKBLOG for June 15, 2009

Monday, June 15, 2009 4:30 PM by Arjan’s World » LINKBLOG for June 15, 2009

Pingback from  Arjan’s World    » LINKBLOG for June 15, 2009

# Web Design - Issue with ADO.NET Sync Services and SQL Server 2000 | Web Design >> ASP.NET News

Pingback from  Web Design  -   Issue with ADO.NET Sync Services and SQL Server 2000 | Web Design >> ASP.NET News

# re: Issue with ADO.NET Sync Services and SQL Server 2000

Wednesday, July 08, 2009 12:39 PM by Brian

I'm wondering if I need to remove the two columns (per table) from my local dataset.  They are showing up in my insert commands and I don't want to populate them if it's not my responsibility.  Any thoughts there?

# re: Issue with ADO.NET Sync Services and SQL Server 2000

Thursday, March 24, 2011 8:20 PM by weblogs.asp.net

Issue with ado net sync services and sql server 2000.. Awful :)

# re: Issue with ADO.NET Sync Services and SQL Server 2000

Saturday, April 23, 2011 11:29 AM by weblogs.asp.net

Issue with ado net sync services and sql server 2000.. Tiptop :)

# re: Issue with ADO.NET Sync Services and SQL Server 2000

Thursday, June 02, 2011 4:48 PM by weblogs.asp.net

Issue with ado net sync services and sql server 2000.. Nice :)

# re: Issue with ADO.NET Sync Services and SQL Server 2000

Saturday, June 04, 2011 5:09 PM by weblogs.asp.net

Issue with ado net sync services and sql server 2000.. He-he-he :)

# re: Issue with ADO.NET Sync Services and SQL Server 2000

Tuesday, May 22, 2012 9:16 AM by Cecil

I'd like to find out more? I'd care to find out more details.

Leave a Comment

(required) 
(required) 
(optional)
(required)