my dog learned polymorphism*
The moose likes Beginning Java and the fly likes sequence number generation Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Java » Beginning Java
Bookmark "sequence number generation" Watch "sequence number generation" New topic
Author

sequence number generation

Ghouse Modhin
Greenhorn

Joined: Sep 18, 2012
Posts: 1
Sir,

I am creating a bill report Application..I want to generate a sequence number for bill that is starting from 1.and if date changes the sequence number again starts with 1.

help me sir.



this is Ghouse. Thanking you Sir
Henry Wong
author
Sheriff

Joined: Sep 28, 2004
Posts: 18876
    
  40

Ghouse Modhin wrote:
I am creating a bill report Application..I want to generate a sequence number for bill that is starting from 1.and if date changes the sequence number again starts with 1.


Pretty straightforward request. What have you done so far?

Henry


Books: Java Threads, 3rd Edition, Jini in a Nutshell, and Java Gems (contributor)
Winston Gutkowski
Bartender

Joined: Mar 17, 2011
Posts: 7892
    
  21

Ghouse Modhin wrote:I want to generate a sequence number for bill that is starting from 1.and if date changes the sequence number again starts with 1.

Any particular reason why? It sounds like the computer equivalent of 'mixing metaphors' to me.

And anyway, what is a 'date' in your mini-verse? Local? GMT? Does it start at midnight? Midday? 8AM? Does it use Daylight savings?

Lots of questions to answer before we can suggest a solution.

Winston


Isn't it funny how there's always time and money enough to do it WRONG?
Articles by Winston can be found here
 
GeeCON Prague 2014
 
subject: sequence number generation