Hi, This sounds like you would want to generate the keys from a database to me, not the form. For example, store things in a relational database table and make the primary key a sequential number, and let the records get their unique numbers automatically as you add them to the database. If you do this, you won't even need to use a form to fill in the sequential numbers. Two database candidates I can think of right away are MySQL and SQLite. But that depends on how you want to handle the data once you get it. Thanks. Jim From: program-l-bounce@xxxxxxxxxxxxx [mailto:program-l-bounce@xxxxxxxxxxxxx] On Behalf Of Kerneels Roos Sent: Wednesday, June 04, 2014 10:34 AM To: program-l@xxxxxxxxxxxxx Subject: [program-l] Re: Unique key generator needed for a web form. Hi. There is a lot of things to consider, and the best solution would be to develop it from scratch yourself. You have to decide, for example, where you will store your references, and ensure the generation is concurrency safe - that two users will never get the same reference. It is not hard! If you can ask us more specific questions directly related to your solution of the problem we can try to answer those. On 2014-06-04 06:27 AM, Jitendra wrote: Hello friends, I want a solution, which should generate a sort of numbers, and should be in a sequence, the number is to be used as the order number, and should be of 4 digits long only for time being. for example, on first order if it generates 5412, the next should be 5413 and so on. do you have any working template, and which way I should I go, the java scr or a program. please attach me in person if you have one, if the generated string is an alphanumaric or more than 4 characters long, I don't mind it. Thanks, Jitendra. --- Disclaimer --- The information in this mail is confidential and is intended solely for addressee. Access to this mail by anyone else is unauthorised. Copying or further distribution beyond the original recipient may be unlawful. Any opinion expressed in this mail is that of sender and does not necessarily reflect that of State Bank group. --- -- Kerneels Roos Cell: +27 (0)79 696 6038 Tel: +27 (0)811 2108 LinkedIn: http://za.linkedin.com/in/kerneels Skype: cornelis.roos ________________________________ This e-mail and any attachments to it are confidential and are intended solely for use of the individual or entity to whom they are addressed. If you have received this e-mail in error, please notify the sender immediately and then delete it. If you are not the intended recipient, you must not keep, use, disclose, copy or distribute this e-mail without the author's prior permission. The views expressed in this e-mail message do not necessarily represent the views of Highmark, its diversified business, or affiliates.