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

推荐订阅源

奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
J
Java Code Geeks
I
InfoQ
V
Visual Studio Blog
M
MIT News - Artificial intelligence
H
Help Net Security
博客园_首页
Blog — PlanetScale
Blog — PlanetScale
F
Fortinet All Blogs
Apple Machine Learning Research
Apple Machine Learning Research
人人都是产品经理
人人都是产品经理
G
Google Developers Blog
A
About on SuperTechFans
腾讯CDC
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
Last Week in AI
Last Week in AI
小众软件
小众软件
aimingoo的专栏
aimingoo的专栏
罗磊的独立博客
大猫的无限游戏
大猫的无限游戏
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
云风的 BLOG
云风的 BLOG
S
SegmentFault 最新的问题
WordPress大学
WordPress大学

博客园 - 江南白衣

花开在眼前 多收了三五斗 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!