惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

Hugging Face - Blog
Hugging Face - Blog
V
Visual Studio Blog
Last Week in AI
Last Week in AI
Stack Overflow Blog
Stack Overflow Blog
The GitHub Blog
The GitHub Blog
Recent Announcements
Recent Announcements
博客园 - Franky
D
DataBreaches.Net
B
Blog
Y
Y Combinator Blog
T
The Blog of Author Tim Ferriss
Microsoft Azure Blog
Microsoft Azure Blog
人人都是产品经理
人人都是产品经理
WordPress大学
WordPress大学
P
Proofpoint News Feed
J
Java Code Geeks
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
Martin Fowler
Martin Fowler
月光博客
月光博客
宝玉的分享
宝玉的分享
Engineering at Meta
Engineering at Meta
阮一峰的网络日志
阮一峰的网络日志
F
Fortinet All Blogs
博客园 - 【当耐特】

博客园 - 江南白衣

花开在眼前 多收了三五斗 SQL Server 2008 Spatial Tools Visual Studio 2008 Service Pack 1 Release View to Presenter Communication Polymorphic Databinding Solutions Composite Application Guidance - What is it? Unsaved Changes When CAB Application Closes: The Notification Pattern AddIn Enabled Applications 带套的日子 NET Debugger Visualizers List Composite Application Guidance for WPF-June 2008 Managed Extensibility Framework (MEF) Managed Extensibility and Add-In Framework 祝我生日快乐 Why use the Entity Framework? Entity Framework FAQ Managed Services for Windows Mobile xUnit.net 1.0.1 Realese
Visual Studio 2008 SP1: Sync Services for ADO.Net with SQ...
江南白衣 · 2008-06-10 · via 博客园 - 江南白衣

原文:http://blogs.microsoft.co.il/blogs/bursteg/archive/2008/05/12/sync-services-for-ado-net-with-sql-server-2008-change-tracking.aspx

One of the main pillars of Visual Studio 2008 and .Net Framework 3.5 Service Pack 1 if the better integration with SQL Server 2008. Service Pack 1 now uses the Change Tracking capabilities of SQL Server 2008 in order to identify the incremental changes.

During the process of writing this post, I am building a simple application with both Visual Studio 2008 and Visual Studio 2008 + SP1 in order to spot the changes in Sync Services for ADO.Net in SP1.

The first thing you notice when you add a new Local Database Cache item, is the Use SQL Server change tracking checkbox. The wizard knows that the connection on the server side was a SQL 2008 connection, and then enabled this checkbox.

Sync Services for ADO.Net Visual Studio 2008 Service Pack 1 Beta VS2008 SP1

When this option is enabled, and you click on the add button in order to select the tables you would like to synchronize, the database schema doesn't need to be changed like it used to be in earlier versions besides enabling the change tracking at the level of the database and each table you want to synchronize.

Sync Services for ADO.Net Visual Studio 2008 Service Pack 1 Beta VS2008 SP1

You can notice in the screenshot above that the Script Generation section of this page is missing. This is because those script are not only at the level of each table, but also at the level of the database itself, where you'd want to enable the change tracking.

When you confirm the Configure Data Synchronization Wizard, you will get the following message:

Sync Services for ADO.Net Visual Studio 2008 Service Pack 1 Beta VS2008 SP1

This message replaces the missing script generation section at the table level and when you confirm it, it will generate the scripts for each table and for the database.

Sync Services for ADO.Net Visual Studio 2008 Service Pack 1 Beta 1 VS2008 SP1

But the difference is, that instead of generating a long script that adds several columns and a tombstone table, it only enabled the change tracking at the database level and at the table level.

Summary

Sync Services for ADO.Net in Visual Studio 2008 SP1 now uses SQL Server 2008 Change Tracking and has the tools support for it. When you use a SQL Server 2008 connection, you don't have to change the database schema but to enable change tracking.

Enjoy!