wood burning stoves 2.0
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: 20057
    
  44

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: 8661
    
  23

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
 
I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link: http://aspose.com
 
subject: sequence number generation
 
It's not a secret anymore!