Application needs replication

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • John

    Application needs replication

    Hi

    We have an MS Access application which runs on the server but some laptop
    users need the app to work offline. Our solution has been to use Access
    replication which automatically syncs data (both ways) when laptop is
    connected to the network. We are looking to rewrite the app to vb.net/sql
    server. My question is how does replication work in sql server specially in
    context of a vb.net front end i.e. what sort of coding/configuration we are
    we looking at?

    Thanks

    Regards


  • =?Utf-8?B?TW9oaXQgSy4gR3VwdGE=?=

    #2
    RE: Application needs replication

    Well since you will have disconnected users; you will need to have a local
    instance of the SQL Server installed on the computer. Then you can SQL
    Server 2005 Merge Replication Topology to do what yaa needed. Read up on it
    at ..


    Thanks!
    --
    Mohit K. Gupta
    B.Sc. CS, Minor Japanese
    MCTS: SQL Server 2005


    "John" wrote:
    Hi
    >
    We have an MS Access application which runs on the server but some laptop
    users need the app to work offline. Our solution has been to use Access
    replication which automatically syncs data (both ways) when laptop is
    connected to the network. We are looking to rewrite the app to vb.net/sql
    server. My question is how does replication work in sql server specially in
    context of a vb.net front end i.e. what sort of coding/configuration we are
    we looking at?
    >
    Thanks
    >
    Regards
    >
    >
    >

    Comment

    • John

      #3
      Re: Application needs replication

      Am I right to believe I need to code as if my app is connected to the same
      single sql server and various sql server installs would automatically take
      care of the sync between themselves without intervention by app when laptops
      are connected to the network?

      Thanks

      Regards

      "Mohit K. Gupta" <mohitkgupta@ms n.comwrote in message
      news:D4FD10E6-2DF6-486A-B6F9-88000C5A076A@mi crosoft.com...
      Well since you will have disconnected users; you will need to have a local
      instance of the SQL Server installed on the computer. Then you can SQL
      Server 2005 Merge Replication Topology to do what yaa needed. Read up on
      it
      at ..

      >
      Thanks!
      --
      Mohit K. Gupta
      B.Sc. CS, Minor Japanese
      MCTS: SQL Server 2005
      >
      >
      "John" wrote:
      >
      >Hi
      >>
      >We have an MS Access application which runs on the server but some laptop
      >users need the app to work offline. Our solution has been to use Access
      >replication which automatically syncs data (both ways) when laptop is
      >connected to the network. We are looking to rewrite the app to vb.net/sql
      >server. My question is how does replication work in sql server specially
      >in
      >context of a vb.net front end i.e. what sort of coding/configuration we
      >are
      >we looking at?
      >>
      >Thanks
      >>
      >Regards
      >>
      >>
      >>


      Comment

      • =?Utf-8?B?TW9oaXQgSy4gR3VwdGE=?=

        #4
        Re: Application needs replication

        In a sense yes, but actually no. What I mean is, since you will have a
        local install of SQL Server on each laptop; you can code the application to
        connect to localhost and no coding required for developer for connecting
        parts. But in fact; these are all different instances of SQL Server on
        different computer, everyone will have different names.

        I haven't coded for replication enviornment, but few challanges that face
        you developers is handling merge conflicts. Three possible cases can happen:

        1) Record is updated, but no longer exists.
        2) Insert a record; and causes a duplicate primary key.
        3) Updating same records in two locations, both valid but are in conflict.

        Replication is usually timed event; so onces the server is on the network,
        the local server will talk to the distributor and the publitioning database
        to update information as needed. I hope this gives you some ideas. Thanks!

        --
        Mohit K. Gupta
        B.Sc. CS, Minor Japanese
        MCTS: SQL Server 2005


        "John" wrote:
        Am I right to believe I need to code as if my app is connected to the same
        single sql server and various sql server installs would automatically take
        care of the sync between themselves without intervention by app when laptops
        are connected to the network?
        >
        Thanks
        >
        Regards
        >
        "Mohit K. Gupta" <mohitkgupta@ms n.comwrote in message
        news:D4FD10E6-2DF6-486A-B6F9-88000C5A076A@mi crosoft.com...
        Well since you will have disconnected users; you will need to have a local
        instance of the SQL Server installed on the computer. Then you can SQL
        Server 2005 Merge Replication Topology to do what yaa needed. Read up on
        it
        at ..


        Thanks!
        --
        Mohit K. Gupta
        B.Sc. CS, Minor Japanese
        MCTS: SQL Server 2005


        "John" wrote:
        Hi
        >
        We have an MS Access application which runs on the server but some laptop
        users need the app to work offline. Our solution has been to use Access
        replication which automatically syncs data (both ways) when laptop is
        connected to the network. We are looking to rewrite the app to vb.net/sql
        server. My question is how does replication work in sql server specially
        in
        context of a vb.net front end i.e. what sort of coding/configuration we
        are
        we looking at?
        >
        Thanks
        >
        Regards
        >
        >
        >
        >
        >
        >
        >

        Comment

        • Cor Ligthert[MVP]

          #5
          Re: Application needs replication

          John,

          You have at least two possiblilties, use a replication of the SQL server
          using by instance SQL Client, or make your application in a way that it uses
          DataSets from the needed information.

          The latter is very easy to do and the way I would go in your situation.

          Cor

          Comment

          • William Vaughn

            #6
            Re: Application needs replication

            And you don't need SQL Server installed on the client(s). Another
            alternative is SQL Server Compact Edition on the clients. It can also act as
            a Subscriber to a SQL Server Publisher. Note that a SQL Server Publisher
            must be Workgroup or better--SQL Express does not support this
            functionality. In addition, you might consider using the new ADO.NET 3.5
            Sync Services due out with Orcas (before the end of the year). In this case
            you don't need SQL Server to act as a Publisher.

            I discuss most of these options in my Ebook on SQL CE.

            hth

            --
            _______________ _______________ ______
            William (Bill) Vaughn
            Author, Mentor, Consultant, Dad, Grandpa
            Microsoft MVP
            INETA Speaker
            Welcome to the home of William Vaughn's Imagination, creations, and advice.

            Welcome to the home of William Vaughn's Imagination, creations, and advice.

            Please reply only to the newsgroup so that others can benefit.
            This posting is provided "AS IS" with no warranties, and confers no rights.
            _______________ _______________ ____
            Visit www.hitchhikerguides.net to get more information on my latest book:
            Hitchhiker's Guide to Visual Studio and SQL Server (7th Edition)
            and Hitchhiker's Guide to SQL Server 2005 Compact Edition (EBook)
            -----------------------------------------------------------------------------------------------------------------------

            "John" <John@nospam.in fovis.co.ukwrot e in message
            news:O4l0ZMECIH A.324@TK2MSFTNG P04.phx.gbl...
            Hi
            >
            We have an MS Access application which runs on the server but some laptop
            users need the app to work offline. Our solution has been to use Access
            replication which automatically syncs data (both ways) when laptop is
            connected to the network. We are looking to rewrite the app to vb.net/sql
            server. My question is how does replication work in sql server specially
            in context of a vb.net front end i.e. what sort of coding/configuration we
            are we looking at?
            >
            Thanks
            >
            Regards
            >

            Comment

            • John

              #7
              Re: Application needs replication

              Hi Cor

              Thanks. How does one keep data persistent on client side when using
              datasets, bearing in mind that clients (laptops) will be disconnected from
              the network/sql server often but would need access to sql server data
              offline? If you can point to some reading that would be great.

              Many Thanks

              Regards

              "Cor Ligthert[MVP]" <notmyfirstname @planet.nlwrote in message
              news:14F13D20-64C8-46CB-BEF1-CC700A4A6474@mi crosoft.com...
              John,
              >
              You have at least two possiblilties, use a replication of the SQL server
              using by instance SQL Client, or make your application in a way that it
              uses DataSets from the needed information.
              >
              The latter is very easy to do and the way I would go in your situation.
              >
              Cor
              >

              Comment

              • Jim Rand

                #8
                Re: Application needs replication

                Take a look at Sybase SQL Anywhere. It's replication capabilities are truly
                amazing.

                "John" <John@nospam.in fovis.co.ukwrot e in message
                news:O4l0ZMECIH A.324@TK2MSFTNG P04.phx.gbl...
                Hi
                >
                We have an MS Access application which runs on the server but some laptop
                users need the app to work offline. Our solution has been to use Access
                replication which automatically syncs data (both ways) when laptop is
                connected to the network. We are looking to rewrite the app to vb.net/sql
                server. My question is how does replication work in sql server specially
                in context of a vb.net front end i.e. what sort of coding/configuration we
                are we looking at?
                >
                Thanks
                >
                Regards
                >

                Comment

                • Cor Ligthert[MVP]

                  #9
                  Re: Application needs replication

                  John,

                  The nature from a dataset is to work ofline, it is build for that.

                  When you do an update, there is looked if there has been a change (this is
                  called optimistic concurrency). The way as the data is organised makes that
                  the chanch for that is low or high.

                  By instance as you are adding and subtrackting values from tablerows,
                  instead of adding mutation rows, then you can probably forget it.

                  Cor

                  Comment

                  • William Vaughn

                    #10
                    Re: Application needs replication

                    Ah, I expect he means you can serialize the DataTable(s) to an XML file or
                    somesuch.
                    Again, the SQL Server Compact Edition (which supports several kinds of
                    replication) is a better option.

                    --
                    _______________ _______________ ______
                    William (Bill) Vaughn
                    Author, Mentor, Consultant, Dad, Grandpa
                    Microsoft MVP
                    INETA Speaker
                    Welcome to the home of William Vaughn's Imagination, creations, and advice.

                    Welcome to the home of William Vaughn's Imagination, creations, and advice.

                    Please reply only to the newsgroup so that others can benefit.
                    This posting is provided "AS IS" with no warranties, and confers no rights.
                    _______________ _______________ ____
                    Visit www.hitchhikerguides.net to get more information on my latest book:
                    Hitchhiker's Guide to Visual Studio and SQL Server (7th Edition)
                    and Hitchhiker's Guide to SQL Server 2005 Compact Edition (EBook)
                    -----------------------------------------------------------------------------------------------------------------------

                    "Cor Ligthert[MVP]" <notmyfirstname @planet.nlwrote in message
                    news:522F9B5D-D648-4D7B-99F1-58EAB1B33923@mi crosoft.com...
                    John,
                    >
                    The nature from a dataset is to work ofline, it is build for that.
                    >
                    When you do an update, there is looked if there has been a change (this is
                    called optimistic concurrency). The way as the data is organised makes
                    that the chanch for that is low or high.
                    >
                    By instance as you are adding and subtrackting values from tablerows,
                    instead of adding mutation rows, then you can probably forget it.
                    >
                    Cor

                    Comment

                    • John

                      #11
                      Re: Application needs replication

                      Thanks Bill.

                      Regards

                      "William Vaughn" <billvaNoSPAM@b etav.comwrote in message
                      news:OYv3bNdCIH A.6012@TK2MSFTN GP03.phx.gbl...
                      Ah, I expect he means you can serialize the DataTable(s) to an XML file
                      or somesuch.
                      Again, the SQL Server Compact Edition (which supports several kinds of
                      replication) is a better option.
                      >
                      --
                      _______________ _______________ ______
                      William (Bill) Vaughn
                      Author, Mentor, Consultant, Dad, Grandpa
                      Microsoft MVP
                      INETA Speaker
                      Welcome to the home of William Vaughn's Imagination, creations, and advice.

                      Welcome to the home of William Vaughn's Imagination, creations, and advice.

                      Please reply only to the newsgroup so that others can benefit.
                      This posting is provided "AS IS" with no warranties, and confers no
                      rights.
                      _______________ _______________ ____
                      Visit www.hitchhikerguides.net to get more information on my latest book:
                      Hitchhiker's Guide to Visual Studio and SQL Server (7th Edition)
                      and Hitchhiker's Guide to SQL Server 2005 Compact Edition (EBook)
                      -----------------------------------------------------------------------------------------------------------------------
                      >
                      "Cor Ligthert[MVP]" <notmyfirstname @planet.nlwrote in message
                      news:522F9B5D-D648-4D7B-99F1-58EAB1B33923@mi crosoft.com...
                      >John,
                      >>
                      >The nature from a dataset is to work ofline, it is build for that.
                      >>
                      >When you do an update, there is looked if there has been a change (this
                      >is called optimistic concurrency). The way as the data is organised makes
                      >that the chanch for that is low or high.
                      >>
                      >By instance as you are adding and subtrackting values from tablerows,
                      >instead of adding mutation rows, then you can probably forget it.
                      >>
                      >Cor
                      >

                      Comment

                      • Cor Ligthert[MVP]

                        #12
                        Re: Application needs replication

                        Bill,

                        I disagree this with you, for extra database you need replication, with a
                        dataset you just needs common updates. The logical problems stays exactly
                        the same.

                        The serialization is completely automaticaly done by Dataset.ReadXML (....)
                        and Dataset.WriteXM L(....), you write it as if this is a problem.

                        Cor

                        Comment

                        • William Vaughn

                          #13
                          Re: Application needs replication

                          Cor, you missed the point. Replication in this case is used for data
                          sharing--not just data persistence.

                          --
                          _______________ _______________ ______
                          William (Bill) Vaughn
                          Author, Mentor, Consultant, Dad, Grandpa
                          Microsoft MVP
                          INETA Speaker
                          Welcome to the home of William Vaughn's Imagination, creations, and advice.

                          Welcome to the home of William Vaughn's Imagination, creations, and advice.

                          Please reply only to the newsgroup so that others can benefit.
                          This posting is provided "AS IS" with no warranties, and confers no rights.
                          _______________ _______________ ____
                          Visit www.hitchhikerguides.net to get more information on my latest book:
                          Hitchhiker's Guide to Visual Studio and SQL Server (7th Edition)
                          and Hitchhiker's Guide to SQL Server 2005 Compact Edition (EBook)
                          -----------------------------------------------------------------------------------------------------------------------

                          "Cor Ligthert[MVP]" <notmyfirstname @planet.nlwrote in message
                          news:C859F647-3DB1-404A-AC9E-10213DDFA7AC@mi crosoft.com...
                          Bill,
                          >
                          I disagree this with you, for extra database you need replication, with a
                          dataset you just needs common updates. The logical problems stays exactly
                          the same.
                          >
                          The serialization is completely automaticaly done by Dataset.ReadXML (....)
                          and Dataset.WriteXM L(....), you write it as if this is a problem.
                          >
                          Cor

                          Comment

                          • Cor Ligthert[MVP]

                            #14
                            Re: Application needs replication

                            Cor, you missed the point. Replication in this case is used for data
                            sharing--not just data persistence.
                            I did not miss that Bill, however why would you do that if there are now
                            simple methods possible in ADONET and not only replication. Using a dataset
                            is in my idea much easier to handle conflicts by your own program.

                            Cor

                            Comment

                            Working...