Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. Design and Architecture
  4. Creating sequential numbering in a semi-connected environment

Creating sequential numbering in a semi-connected environment

Scheduled Pinned Locked Moved Design and Architecture
questionhelpworkspace
4 Posts 3 Posters 2 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • F Offline
    F Offline
    francoisdotnet
    wrote on last edited by
    #1

    Hi I have been pondering this "problem" for a while now and thought I'd submit it here for some more ideas. (Hope I chose the right message board.) Scenario: an application that allows users to generate quotes, obviously the quotes need some sort of sequential numbering. The problem is that it is a semi-connected application so the user could be generating the quote offline. Question: What is the best way to go about generating a quote (reference) number? Some of my ideas: the 1st would be something like a date-time stamp (including miliseconds) but this makes the number to long. You don't want the client reading a 16 digit number for reference purposes. I also though of including a type of employee code to increate the uniqueness but I don't think it will help too much. Am I missing something or is this fairly impossible to do? Your comments will be great. Thanks Francois

    M L 2 Replies Last reply
    0
    • F francoisdotnet

      Hi I have been pondering this "problem" for a while now and thought I'd submit it here for some more ideas. (Hope I chose the right message board.) Scenario: an application that allows users to generate quotes, obviously the quotes need some sort of sequential numbering. The problem is that it is a semi-connected application so the user could be generating the quote offline. Question: What is the best way to go about generating a quote (reference) number? Some of my ideas: the 1st would be something like a date-time stamp (including miliseconds) but this makes the number to long. You don't want the client reading a 16 digit number for reference purposes. I also though of including a type of employee code to increate the uniqueness but I don't think it will help too much. Am I missing something or is this fairly impossible to do? Your comments will be great. Thanks Francois

      M Offline
      M Offline
      Mark Churchill
      wrote on last edited by
      #2

      In a semi connected environment its going to be extremely difficult to pull off sequential numbering at all. I'm assuming this is the scenario: 1. Your field guys may disconnect 2. Create an arbitary number of quotes 3. Give the client their quote number on the spot 4. Return and resync. Point 2 can be solved if you can get them to create a pending quote on the way out for all their appointments, this might be a workaround. Point 3 prevents you from ever changing the quote number on resync, so you need to be certain its good. I'd question the need for exact sequential numbering. Typically accountanty people like their invoice numbers to be sequential, but this doesnt prevent you from giving a reference number that can be generated on the spot. Generation would depend on your environment, something like field guy id dash, sequence number.

      Mark Churchill Director Dunn & Churchill

      F 1 Reply Last reply
      0
      • M Mark Churchill

        In a semi connected environment its going to be extremely difficult to pull off sequential numbering at all. I'm assuming this is the scenario: 1. Your field guys may disconnect 2. Create an arbitary number of quotes 3. Give the client their quote number on the spot 4. Return and resync. Point 2 can be solved if you can get them to create a pending quote on the way out for all their appointments, this might be a workaround. Point 3 prevents you from ever changing the quote number on resync, so you need to be certain its good. I'd question the need for exact sequential numbering. Typically accountanty people like their invoice numbers to be sequential, but this doesnt prevent you from giving a reference number that can be generated on the spot. Generation would depend on your environment, something like field guy id dash, sequence number.

        Mark Churchill Director Dunn & Churchill

        F Offline
        F Offline
        francoisdotnet
        wrote on last edited by
        #3

        Thanks for your input Mark I will definitely interrogate the reasoning behind HAVE TO HAVE a sequential numbering. I thought of a workaround similar to your pending quote and that is that the field guy prerequests a few seq-reference numbers which is then allocated to him. No more allocated numbers left = can't create quote.

        1 Reply Last reply
        0
        • F francoisdotnet

          Hi I have been pondering this "problem" for a while now and thought I'd submit it here for some more ideas. (Hope I chose the right message board.) Scenario: an application that allows users to generate quotes, obviously the quotes need some sort of sequential numbering. The problem is that it is a semi-connected application so the user could be generating the quote offline. Question: What is the best way to go about generating a quote (reference) number? Some of my ideas: the 1st would be something like a date-time stamp (including miliseconds) but this makes the number to long. You don't want the client reading a 16 digit number for reference purposes. I also though of including a type of employee code to increate the uniqueness but I don't think it will help too much. Am I missing something or is this fairly impossible to do? Your comments will be great. Thanks Francois

          L Offline
          L Offline
          Lost User
          wrote on last edited by
          #4

          Does the quote ID have to be numeric or could you use a string? Does it have to be sequential or just unique within the system? How about a combination of unique employee ID and time? Assuming it takes longer than a second to generate a quote then you would only need the date-time stamp with seconds. You could then encode this as a string in base 36 (all 26 letters and 10 numbers)

          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • World
          • Users
          • Groups