Forums
This topic is locked
unique number
Posted 22 May 2003 11:21:53
1
has voted
22 May 2003 11:21:53 Paul Gannon posted:
Hi I'm trying to create a form which will allow information to be entered into a database, but on the response page I want that information to be given back to the user with a a Unique reference number. This is so the user can print it and keep a copy, whilst there details that were entered have this unique number in the database.
One way I have tried to do this is by making an 'insert' page which inputs to the data into the database, and of course each time a new record is added, it will have a new ID. I am wondering how I would get a new page with the details they entered and the ID of their record in the dataabse so that the copy they print off matches their entry in the database.
Am I going about this the correct way or is there a better way of generating a unique ID number for each entry?
Any help would be greatfully appreciated.
Many Thanks in advance
Paul
Edited by - pdg123 on 22 May 2003 12:21:28
Replies
Replied 22 May 2003 12:57:26
22 May 2003 12:57:26 David Behan replied:
You might find this script useful. It creates a random code everytime it is run. The longer the code, the more combinations there are. You can add the autonumber to the end of the code to ensure it is unique as well.
www.aspin.com/func/content-review?id=5254110&rid=
Cheeurs,
Dave
_________________________
WinXP : IIS 5.1 : StudioMX : ASP : VBScript
www.dynamic.ie
www.aspin.com/func/content-review?id=5254110&rid=
Cheeurs,
Dave
_________________________
WinXP : IIS 5.1 : StudioMX : ASP : VBScript
www.dynamic.ie
Replied 22 May 2003 13:37:58
22 May 2003 13:37:58 Paul Gannon replied:
Thanks for the bit of code dave, it works a treat <img src=../images/dmxzone/forum/icon_smile.gif border=0 align=middle>
Paul
Paul
Replied 22 May 2003 14:50:28
22 May 2003 14:50:28 David Behan replied:
No problem mate.
Cheeurs...
_________________________
WinXP : IIS 5.1 : StudioMX : ASP : VBScript
www.dynamic.ie
Cheeurs...
_________________________
WinXP : IIS 5.1 : StudioMX : ASP : VBScript
www.dynamic.ie