locked
Sync FrameWork with WP7.5 Mobile. RRS feed

  • General discussion

  • Dear All,

    I am currently new bee for this sync frame work and its been litlle bit difficult to findout documentation on this.

    My requirerments are as following.

    I have WP7.5 as client and Server as SQL Server 2008 R2. Now i want to create sdf database on WP7.5  in sdf DB file there is one table in which WP7.5 users will make an entry.

    Once done whenever WP7.5 users will come to there laptop they can sync this entries by just connecting the phone and using WCF service created on laptop and published on the IIS. For this i have followed this article and i was able to create this services fine.

    http://blog.dotnetstudio.nl/index.php/2011/01/21/using-the-sync-framework-on-windows-phone-7/

    Now in this above example its only one way method which will bring data from SQL SErver 2008 R2 DEV on Laptop to mobile device and changes will be reflected on sync. to server.

    Now i want to only upload changes to the server from client.(WP7.5).

    Is it possible with this Sync FrameWork.

    Please guide me through any aricle which explain it in Detail or any book would be very much appericiate.

    Many Thanks for your valuable time.

    Regards,

    Nirav


    Regards, Nirav Joshi

    Tuesday, February 21, 2012 12:23 PM

All replies

  • the sample you posted is actually doing bidirectional sync.

    the sync direction is not configurable in the sync toolkit but you can modify the code in the CacheController. by default its doing an Upload and Download operation. you may modify the code to skip the download part.

    another hack is to disable the triggers on the server side tables. without the trigger firing, the tracking tables will not be updated. without updates recorded in the tracking tables, no changes will be detected for download.

    Tuesday, February 21, 2012 1:30 PM
  • Hi June,

    Many Thanks for your time feedback.

    I do agree with your point here we can do this modification on cache controller. Do you have any good documentation on this cache controller.

    Currently I am trying this  way.

    Step1 Create SDF DB on WP 7.1 and create table inside it.

    Step2 Now User WP 7.1 makes an entry to Table in SDF DB.

    Step3 Whenever user will get time they will connect their phone to LAPTOP and then they can upload the changes to the server.(Using WCF Service)

    Step4 In order to do this i have simple table "ToDoTasks" which is as following.

    CREATE TABLE [dbo].[ToDoTasks](	[ItemID] [int] IDENTITY(1,1) NOT NULL,	[ItemName] [nvarchar](200) NOT NULL,	[ItemDateCreated] [datetime] NOT NULL,	[ItemIsBought] [bit] NOT NULL, CONSTRAINT [PK_ToDoTasks] PRIMARY KEY CLUSTERED (	[ItemID] ASC)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]) ON [PRIMARY]GO

    Step5 When WP7.1 users clicks on the sync button it will first fetch what was the last sync DateTime was there and then according to that time it will only filter this entries which was made after that time.Push those entries to the server so we can avoid full sync of all rows of this table.

    Do let me know your thoughts/suggestion on this.

    It was better to do when we have Web Synchronization was there in SQL Server with earlier windows phone 6.5.

    I am not sure does this facility is avail with WP7.1.

    Once Many thanks for your time.


    Regards, Nirav Joshi

    Tuesday, February 21, 2012 1:57 PM
  • You don't have to explicitly track the last sync date and time, the framework does that for you already and will only sync incremental changes since the last sync.

    There is not much documentation on the cache controller other than the one bundled with the toolkit.

    Tuesday, February 21, 2012 2:46 PM