locked
Newbee needs desperate help uses Sync Framework to synchronize SQL Server and SQL Server Compact databases RRS feed

  • Question

  • HI
    I am brand new to mobile programming. I wanted to use RDA but all Microsoft says that RDA is going away so use the Sync Framework. Well I went through all the examples that Microsoft give but as usual I can't get any of the code to work.

    I am in desperate need here. Are there any exomaples out there on how to use the Sync Framework. And by what I mean as an example one where:
    It gives a step by step instruction on how to

    Set up the compact database on the device

    Down load data from SQL Server 2008 to the compact databbase on device

    Upload data from the compact database to the tables on SQL Server 2008

    BECAUSE THAT IS ALL I WANT TO DO:

    Download data from the sql server database to the compact database on the device then upload information from the compact database on the device to the SQL Server database tables.

    It sounds so basic yet I can not find one good example on how to do this.

    PLEASE HELP!!!

    Thanks

    MutlyP

    Wednesday, July 28, 2010 5:51 PM

All replies

  • Take a look at the sample code from the gallery.

    http://code.msdn.microsoft.com/Release/ProjectReleases.aspx?ProjectName=sync&ReleaseId=3422

    This should be helpful in your scenario. What you are describing is Database Provider scenario where you are sync'ing SQL Server with SQL Ce which is very much supported by our product.

    Hope this helps,

    Patrick

    • Proposed as answer by Patrick S. Lee Wednesday, July 28, 2010 6:46 PM
    Wednesday, July 28, 2010 6:45 PM
  • Hi mutlyp,

    Check out "Sync Services for ADO.NET for devices" from http://www.microsoft.com/downloads/details.aspx?familyid=75FEF59F-1B5E-49BC-A21A-9EF4F34DE6FC&displaylang=en. It should have what you need.


    SDE, Sync Framework - http://msdn.com/sync/
    • Proposed as answer by Ganeshan Wednesday, July 28, 2010 7:30 PM
    Wednesday, July 28, 2010 7:30 PM
  • check out a sample step by step instruction here: http://msdn.microsoft.com/en-us/library/dd938879.aspx
    Wednesday, July 28, 2010 11:00 PM
  • Hi Patrick

    Thank you for the response. Unfortunantly this is one of the code I could not get to work. When I ran the code it gave me an error about not finding the server. That was because the parameter hostName had the wrong name for my server instance. When I change the connection string to the correct server I get an error saying that my log in failed but I set the connection string to Intergrated sevurity= true. So I should not need a log in. Can't find in the code where they set the login so I moved on to the next demo that did not work.

    MutlyP

    Thursday, July 29, 2010 2:02 AM
  • Hi Ganeshan

    Thanks for the response. You see this is the problem that I am having. Here I have 3 really nice people giving me examples on how to accomplish what I need to do. All 3 examples are complely different. YOur example is for mobile 6.0. So that means this is old because I know mobile 6.5 is out.

    Patrick above gave me an example that doesn't work and June below gave me an example that uses WFC.

    You can see how I can get confused as a beginner.

    All I am looking for is the basic way to download data from a SQL Server 2008 database to a compact database on a device and vice versa. Why is it so difficult to get a straight answer?????

    Thank YOU again

    MutlyP

    Thursday, July 29, 2010 2:08 AM
  • Hi Jue

    Thanks for the response. You see this is the problem that I am having. Here I have 3 really nice people giving me examples on how to accomplish what I need to do. All 3 examples are complely different. YOur example usaes WFC while all the othe expamples do not.

    Patrick above gave me an example that doesn't work and Ganeshan is for mobile 6.0. So that means this is old because I know mobile 6.5 is out. .

    You can see how I can get confused as a beginner.

    All I am looking for is the standard way to download data from a SQL Server 2008 database to a compact database on a device and vice versa. Why is it so difficult to get a straight answer?????

    Thank YOU again

    MutlyP

    Thursday, July 29, 2010 2:10 AM
  • The link that Ganeshan provided you is the SDK/runtime for mobile devices . The link from Patrick is a sample that you can look at how it works. The link i gave you is a step by step process you are asking for and is the best you one you can follow if you are a beginner. (that sample alone is almost complete you just have to substitute your own database and tables)

    Why is it so difficult to get a straight answer????? - this is a free forum where people try to give you as much lead or answer as they can. It will be up to you to check out the options. You can't expect most people here to sit down and write down a tutorial for you.

    Thursday, July 29, 2010 2:47 AM
  • Hi June

    In no way am I trying to insult anyone here on this forum. I really appreciate all your help. My frustration is, not being able to find a standard way of doing what I am asking. For instance why is the step by step link you sent me use WFC and none of the other examples do?

    The link that gives me the SDK is for 6.0 but I know 6.5 is out so should I not use the 6. SDK because it is the latest?

    And the other link I was given does not show or tell you how to change the login parameter. And since I put in my string connection to use intergratd security it should not ask for a log in to the server. Correct?

    Not trying to be a jerk here. Just trying to figure out the standard way to do this. Not looking for someone here to write out a step by step. I was hoping that there would be a standard out there already put together by Microsoft that I just couldn't find.

    Thank you again for all your help.

    MutlyP

    Thursday, July 29, 2010 2:30 PM