|
dev
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
ADO.NET Sync Partial TableIs 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? 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; Show quote "JStorm" <OuterStorm@noemail.noemail> wrote in message news:BB37E171-5F1A-46E1-A826-2635AED4A6D2@microsoft.com... > 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? 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/ShowForum.aspx?ForumID=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. 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/archive/2007/11/13/filtering-data-ado-net-synchronization-services.aspx Show quote "JStorm" <OuterStorm@noemail.noemail> wrote in message news:BB37E171-5F1A-46E1-A826-2635AED4A6D2@microsoft.com... > 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? |
|||||||||||||||||||||||