PC Review


Reply
Thread Tools Rate Thread

ADO.NET Sync Partial Table

 
 
=?Utf-8?B?SlN0b3Jt?=
Guest
Posts: n/a
 
      12th Nov 2007
Is it possible to use the ADO.NET 2008 Sync Framework to sync only a portion
of a table?

Syncing the entire table is not an option for the app I am working on due to
the sheer size of the table, so I was wanting to apply business requirements
to the sync logic.

If it is possible, can somebody point me to an example somewhere?
 
Reply With Quote
 
 
 
 
W.G. Ryan
Guest
Posts: n/a
 
      13th Nov 2007
J:
If you look at the SyncServices_CSharp_DownloadOnly app and specifically,
the Constructor for the SampleServerSyncProvider - just replace the code in
the middle where you actually delcare the SqlSyncAdapterBuilder to the code
below:

Basically, you add a FilterClause (and if it's parameterized, you can add a
SqlParameter - I was a bum and used concatenated sql which I should be
flogged for, but I wanted to whip something up quick this evening before I
signed off. To get the sample code to do the whole thing with a 'real'
param, there's a demo here
ms-help://MS.SynchronizationServices.v1.EN/syncdata1/html/15abacc8-a243-4570-86e9-da95bb5bfddd.htm
on BOL for Syn Services




//Instantiate a synchronization adapter builder, which

//queries the tables to be synchronized and builds the

//synchronization adapter and commands required to

//perform synchronization.

SqlSyncAdapterBuilder builder = new
SqlSyncAdapterBuilder((SqlConnection)this.Connection);

//Add the Customer table and its tombstone table, and

String filterCommand = "CustomerName='Sharp Bikes'";

//specify synchronization direction.

builder.TableName = "Sales.Customer";

builder.TombstoneTableName = builder.TableName + "_Tombstone";

builder.FilterClause = filterCommand ;

builder.TombstoneFilterClause = filterCommand;

"JStorm" <(E-Mail Removed)> wrote in message
news:BB37E171-5F1A-46E1-A826-(E-Mail Removed)...
> Is it possible to use the ADO.NET 2008 Sync Framework to sync only a
> portion
> of a table?
>
> Syncing the entire table is not an option for the app I am working on due
> to
> the sheer size of the table, so I was wanting to apply business
> requirements
> to the sync logic.
>
> If it is possible, can somebody point me to an example somewhere?



 
Reply With Quote
 
WenYuan Wang [MSFT]
Guest
Posts: n/a
 
      14th Nov 2007
Hello OuterStorm

Thanks for Willam's suggestion. Have you had chance to try it so far?
Because VS 2008 RTM hasn't been released so far. For such ADO.net Sync
Service issue, I suggest you may consider posting it in MSDN forum. To
special ADO.net Sync Service issue, the people in those groups will be more
likely to be able to help and familiar in such field.
http://forums.microsoft.com/MSDN/Sho...=1225&SiteID=1

Hope this helps. If you have any more concern, please feel free to update
here again. We are glad to assist you.

Have a great day,
Best regards,

Wen Yuan
Microsoft Online Community Support
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.

 
Reply With Quote
 
W.G. Ryan
Guest
Posts: n/a
 
      14th Nov 2007
J: I posted this too, you may find it helpful b/c I elaborated a little more
on the subject

http://msmvps.com/blogs/williamryan/...-services.aspx


"JStorm" <(E-Mail Removed)> wrote in message
news:BB37E171-5F1A-46E1-A826-(E-Mail Removed)...
> Is it possible to use the ADO.NET 2008 Sync Framework to sync only a
> portion
> of a table?
>
> Syncing the entire table is not an option for the app I am working on due
> to
> the sheer size of the table, so I was wanting to apply business
> requirements
> to the sync logic.
>
> If it is possible, can somebody point me to an example somewhere?



 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
One partial table, one master table - update the partial boilermaker Microsoft Excel Misc 3 28th May 2010 08:33 PM
Vista - OutLook 2007 - PPC2003SE - sync problems - partial sync Paul P Microsoft Outlook 36 29th Oct 2007 12:59 AM
Vista - OutLook 2007 - PPC2003SE - sync problems - partial sync Paul P Microsoft Outlook Discussion 36 29th Oct 2007 12:59 AM
Excel - Pivot Table Partial Column % carlo Microsoft Excel Discussion 1 26th Jul 2005 05:10 PM
Table of Content - partial heading only Hong Microsoft Word Document Management 2 28th Aug 2004 04:32 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 05:34 AM.