Smart Client and offline Id number

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

    #1

    Smart Client and offline Id number

    Hello All,

    I am programming a smart client application that should, of course,
    work offline with most of the functionalities while online. The program
    will have a local database that will keep the data till the portable
    computer gets online and sync with the main database.

    The issue I am having is the person on the field needs to give a case
    number or a reference number to the client that must unique all the
    time. This number should be the same in both the local and the
    centralized database after syncing. I was thinking of using the
    following format ddmmyyOnSitePer sonIDsequential Number or
    OnSitePersonIDh hmmssddmmyy. But, what if the RTC battery on the laptop
    is bad? that will definitly screw things up.

    Any ideas? Is there a Microsoft standart for this issue?

    Your help is appreciated.

    Ahmed

  • Kerry Moorman

    #2
    RE: Smart Client and offline Id number

    Ahmed,

    You might be able to use a GUID.

    Kerry Moorman


    "Ahmed" wrote:
    [color=blue]
    > Hello All,
    >
    > I am programming a smart client application that should, of course,
    > work offline with most of the functionalities while online. The program
    > will have a local database that will keep the data till the portable
    > computer gets online and sync with the main database.
    >
    > The issue I am having is the person on the field needs to give a case
    > number or a reference number to the client that must unique all the
    > time. This number should be the same in both the local and the
    > centralized database after syncing. I was thinking of using the
    > following format ddmmyyOnSitePer sonIDsequential Number or
    > OnSitePersonIDh hmmssddmmyy. But, what if the RTC battery on the laptop
    > is bad? that will definitly screw things up.
    >
    > Any ideas? Is there a Microsoft standart for this issue?
    >
    > Your help is appreciated.
    >
    > Ahmed
    >
    >[/color]

    Comment

    • Brian Swanson

      #3
      Re: Smart Client and offline Id number

      Use a GUID

      Hope this helps,
      Brian Swanson

      "Ahmed" <ahmed1979@gmai l.com> wrote in message news:ahmed1979@ gmail.com:[color=blue]
      > Hello All,
      >
      > I am programming a smart client application that should, of course,
      > work offline with most of the functionalities while online. The program
      > will have a local database that will keep the data till the portable
      > computer gets online and sync with the main database.
      >
      > The issue I am having is the person on the field needs to give a case
      > number or a reference number to the client that must unique all the
      > time. This number should be the same in both the local and the
      > centralized database after syncing. I was thinking of using the
      > following format ddmmyyOnSitePer sonIDsequential Number or
      > OnSitePersonIDh hmmssddmmyy. But, what if the RTC battery on the laptop
      > is bad? that will definitly screw things up.
      >
      > Any ideas? Is there a Microsoft standart for this issue?
      >
      > Your help is appreciated.
      >
      > Ahmed[/color]

      Comment

      • OHM \( Terry Burns \)

        #4
        Re: Smart Client and offline Id number

        GUID's are definately a well prescribed method of obtaining a unique
        reference ( or virtually unique ). However, they are not allways useable
        from a human perspective. There are many times that one might perfer a
        sequenced incremental value rather than a randomly generated value.

        If this is an issue, you may want to consider using an auto number field
        with a -1 seed and decrement by 1, when you INSERT into the central
        database, these numbers can be converted to a unique numbers.

        I.E.
        Me.DataSet11.Ta bles(0).Columns (1).AutoIncreme ntSeed = -1

        Me.DataSet11.Ta bles(0).Columns (1).AutoIncreme ntStep = -1


        HTH

        --
        OHM ( Terry Burns )



        "Ahmed" <ahmed1979@gmai l.com> wrote in message
        news:1109693369 .092004.43600@g 14g2000cwa.goog legroups.com...[color=blue]
        > Hello All,
        >
        > I am programming a smart client application that should, of course,
        > work offline with most of the functionalities while online. The program
        > will have a local database that will keep the data till the portable
        > computer gets online and sync with the main database.
        >
        > The issue I am having is the person on the field needs to give a case
        > number or a reference number to the client that must unique all the
        > time. This number should be the same in both the local and the
        > centralized database after syncing. I was thinking of using the
        > following format ddmmyyOnSitePer sonIDsequential Number or
        > OnSitePersonIDh hmmssddmmyy. But, what if the RTC battery on the laptop
        > is bad? that will definitly screw things up.
        >
        > Any ideas? Is there a Microsoft standart for this issue?
        >
        > Your help is appreciated.
        >
        > Ahmed
        >[/color]


        Comment

        • Ahmed

          #5
          Re: Smart Client and offline Id number

          Thanks everyone. I think I will go with the seed solution. The GUID is
          too long.

          I really appreciated

          Ahmed

          Comment

          • Cor Ligthert

            #6
            Re: Smart Client and offline Id number

            Terry,

            The autoincrement has in my opinion very bad behaviour with updating in a
            single however even more in a multiuser environment. (It needs forever
            reading the dataset new).

            Where an uniqueidentifie r id should never be used for human purposes in my
            opinion, so the lenght is not important.

            I prefer as well the GUID

            Just to let you know my thought about this.

            An advice try it once.

            Nice to see you Newbie

            Cor


            Comment

            • Ahmed

              #7
              Re: Smart Client and offline Id number

              Hi Cor,

              In our case we need the unique number to be used by humans. We have 50
              inspectors who have laptops. After doing the inspection offline they
              will print it out with the Case/reference Number and handed out to the
              customer. If the customer has a complain they need to refer to that
              number to file the complain.

              Do you still Suggest the GUID? Isn't there a chance that any of the
              inspector will have the get the same GUID for two inspections? This
              system will at least be used for 7-10 years. During the 7-10 years we
              can not afford to have 1 duplicate or collission.

              Do you still advise me to use the GUID ?
              Thanks
              Ahmed

              Comment

              • Cor Ligthert

                #8
                Re: Smart Client and offline Id number

                Ahmed,

                I think that I still would use in that situation the Guid as
                uniqueidentifie r, however beside that a number used as reference number for
                your clients by instance y mm dd inspectornr, sequencenr inside day.

                In my idea is the autoidentifier in your situation unusable.

                When it is created it is -1 -2 and than you have first to update the real
                database to get the real number.
                What I understand now is not what you are after.

                However just my idea.

                Cor


                Comment

                • OHM \( Terry Burns \)

                  #9
                  Re: Smart Client and offline Id number

                  One other alternative is to use a web service to generate the numbers from
                  a central reservation. There are some issues with this method though,
                  performance being one of them. One of the most annoying problems is
                  non-contiguous numbers, if one generates numbers this way, they may never be
                  used and this allows gaps in the sequence ( depending on how you code it ) ,
                  to humans, this is a little disturbing. as you want to know why they are
                  missing.

                  There are other methods I have seen as well, but they all have their own
                  little issues. This is one of the challenges we face with the disconnected
                  data model. It's inherently scalable, but you need to think differently.

                  OHM ( Terry Burns )



                  "Cor Ligthert" <notmyfirstname @planet.nl> wrote in message
                  news:%23Bew$p1H FHA.3072@tk2msf tngp13.phx.gbl. ..[color=blue]
                  > Ahmed,
                  >
                  > I think that I still would use in that situation the Guid as
                  > uniqueidentifie r, however beside that a number used as reference number
                  > for your clients by instance y mm dd inspectornr, sequencenr inside day.
                  >
                  > In my idea is the autoidentifier in your situation unusable.
                  >
                  > When it is created it is -1 -2 and than you have first to update the real
                  > database to get the real number.
                  > What I understand now is not what you are after.
                  >
                  > However just my idea.
                  >
                  > Cor
                  >[/color]


                  Comment

                  • Ahmed

                    #10
                    Re: Smart Client and offline Id number

                    Regarding the number I think we will go with the Employee_number +
                    sequential number. That number will be saved in the local database of
                    the laptop. once the inspector connects to the network (goes online)
                    the two databases will sync up. It does not matter if we have a gap in
                    the primary number. but will there be a negative affect
                    performancewise ?

                    Tomorrow I will be attending a microsoft event about VS 2005 here in
                    Ottawa. I will try ask around and will let you know.

                    Thanks everyone.

                    Ahmed

                    Comment

                    • avinashraj
                      New Member
                      • May 2006
                      • 1

                      #11
                      RE: Smart Client and offline Id number

                      Hello Ahmed,

                      I have the exact same issue and was curious to know -
                      1. Did you find any other way to generate the client side IDs ?
                      and so what has been a good way with you ?

                      2. I am also curious to know how you perform your online/offline sychronization. I need to work in a Merge mode and in a heterogenous database environment and so cant use native sql replication engine.

                      I was hoping to get some pointers from you.

                      Thanks,
                      Avinash

                      Originally posted by Ahmed
                      Regarding the number I think we will go with the Employee_number +
                      sequential number. That number will be saved in the local database of
                      the laptop. once the inspector connects to the network (goes online)
                      the two databases will sync up. It does not matter if we have a gap in
                      the primary number. but will there be a negative affect
                      performancewise ?

                      Tomorrow I will be attending a microsoft event about VS 2005 here in
                      Ottawa. I will try ask around and will let you know.

                      Thanks everyone.

                      Ahmed

                      Comment

                      Working...