locked
Creating Schema - Sync Services !! RRS feed

  • Question

  • Please check out this : http://social.msdn.microsoft.com/Forums/en-US/netdevelopmentfr/thread/f750a415-5d62-4536-8acc-036980aa93f7

    i post it in the wrong forum i think :D
    • Moved by Hengzhe Li Friday, April 22, 2011 2:12 AM (From:SyncFx - Microsoft Sync Framework Database Providers [ReadOnly])
    Thursday, July 9, 2009 8:02 AM

Answers

  • PLease try to subscribe to the event CreatingSchema and SchemaCreated from the client provider in your Sync App.  If those 2 events are called, then you really have schema created on the client store.

    Thanks.
    Leo Zhou ------ This posting is provided "AS IS" with no warranties, and confers no rights.
    Wednesday, July 29, 2009 8:26 PM
    Answerer

All replies

  • Are you using Snapshot as the sync direction?  If you do not have to do it this way, then you can try DownloadOnly as the sync direction.

    Thanks.


    Leo Zhou ------ This posting is provided "AS IS" with no warranties, and confers no rights.
    Wednesday, July 22, 2009 5:53 PM
    Answerer
  • Are you using Snapshot as the sync direction?  If you do not have to do it this way, then you can try DownloadOnly as the sync direction.

    Thanks.


    Leo Zhou ------ This posting is provided "AS IS" with no warranties, and confers no rights.
    thx for the reply, but i am not using snapshot !!! is there a way to stop creating the schema after the first time synchronization ? :)
    Thursday, July 23, 2009 7:57 AM
  • What is the sync direction and table creation option in your sync App?  By the way, do you really see the schema created in each sync or you just got 25 seconds measured in the CreatingSchema event?

    Thanks.
    Leo Zhou ------ This posting is provided "AS IS" with no warranties, and confers no rights.
    Friday, July 24, 2009 5:41 PM
    Answerer
  • What is the sync direction and table creation option in your sync App?  By the way, do you really see the schema created in each sync or you just got 25 seconds measured in the CreatingSchema event?

    Thanks.
    Leo Zhou ------ This posting is provided "AS IS" with no warranties, and confers no rights.

    The Sync Directions of my tables is bidirectionnal and yes i can see that each time he is creating the schema i made a progress liste and a listBox that add to the list each level name and one of them is CreatingSchema ..  this is my code

    this .Interventions.SyncDirection = Microsoft.Synchronization.Data.SyncDirection .Bidirectional;


    private void Synchronize()

            {

                ToServerSyncContractClient proxy = new ToServerSyncContractClient ();

                ToServerSyncAgent myAgent = new ToServerSyncAgent (proxy);

     

                myAgent.SessionProgress += new EventHandler <SessionProgressEventArgs >(AgentSessionProgress);

                var stats = myAgent.Synchronize();

                myAgent.SessionProgress -= new EventHandler <Microsoft.Synchronization.SessionProgressEventArgs >(AgentSessionProgress);

            }



    private void AgentSessionProgress(object sender, Microsoft.Synchronization.SessionProgressEventArgs e)

            {

                if (this .InvokeRequired)

                {

                    var tmp = new EventHandler <SessionProgressEventArgs >(AgentSessionProgress);

                    this .Invoke(tmp, new Object [] { sender, e });

                }

                else

                {

                    this .progressBar.Value = e.PercentCompleted;

                    this .lstetapes.Items.Add("Level : " + e.SyncStage.ToString());

     

                }

            }



    and this is the resutl each time i run it : http://i32.tinypic.com/2820wo6.jpg

    So anyway to avoid creating the schema each time ?

    Thank you :)


    Monday, July 27, 2009 12:18 PM
  • PLease try to subscribe to the event CreatingSchema and SchemaCreated from the client provider in your Sync App.  If those 2 events are called, then you really have schema created on the client store.

    Thanks.
    Leo Zhou ------ This posting is provided "AS IS" with no warranties, and confers no rights.
    Wednesday, July 29, 2009 8:26 PM
    Answerer