473,405 Members | 2,167 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,405 software developers and data experts.

Submitting form with a unique ID

Hi All,

I'm looking for some information/code samples on how I can create a
simple web form that includes an auto-generated Unique ID on the form.

The form includes the following 3 fields (Unique ID, First Name and
Last Name). I have a SQL Server 2000 back-end with the table created
as follows:

UniqueID - numeric (9)
FirstName - varchar (50)
LastName - varchar (50)

Ideally I would like the user just to enter their First and Last Name
and the form automatically creates a Unique ID for them. Once they
type in their First/Last Name the user submits the information to the
database. I've managed to get the web form created so that it submits
the First/Last Name successfully but I can't think how to create the
Unique ID, ideally I'd like this to be based around the time/date of
submittal.

Any guidance would be much appreciated.

Thanks

Scott
Nov 17 '05 #1
2 2776
James... If you declare an IDENTITY column, SQL will return a
uniqueID upon INSERT. If you want to generate your own
uniqueID you could do a concatenation of the MAC address of the
client ethernet card plus a timestamp.

Regards,
Jeff
I've managed to get the web form created so that it submits

the First/Last Name successfully but I can't think how to create the
Unique ID, ideally I'd like this to be based around the time/date of
submittal.<
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 17 '05 #2
Using a system generated GUID is quick and easy, although kinda long.
16 bytes minimum.

"James Brown" <i.*@winning.com> wrote in message
news:1f**************************@posting.google.c om...
Hi All,

I'm looking for some information/code samples on how I can create a
simple web form that includes an auto-generated Unique ID on the form.

The form includes the following 3 fields (Unique ID, First Name and
Last Name). I have a SQL Server 2000 back-end with the table created
as follows:

UniqueID - numeric (9)
FirstName - varchar (50)
LastName - varchar (50)

Ideally I would like the user just to enter their First and Last Name
and the form automatically creates a Unique ID for them. Once they
type in their First/Last Name the user submits the information to the
database. I've managed to get the web form created so that it submits
the First/Last Name successfully but I can't think how to create the
Unique ID, ideally I'd like this to be based around the time/date of
submittal.

Any guidance would be much appreciated.

Thanks

Scott

Nov 17 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

8
by: AC | last post by:
I hope someone can tell me why this is not working. I have a form that dynamically creates the code below. This is for one product and there are about 10 to 50 products that are listed depending...
2
by: Greg T | last post by:
Hi, I have a rather long form that I don't want people submitting unless they are absolutely sure they are ready. I figured the easiest way to prevent an accidental form submission by way of...
5
by: Don | last post by:
I have a need to submit a form, but don't need the user to click on a button. How do I do this? Is there some way, using JavaScript, to setup a <form> tag to do this? Thanks, Don ----==...
3
by: Chris Baker | last post by:
This is a problem I have been troubleshooting for about 4-6 months. I have an e-mail form on a client's public website that is mis-behaving. It is written in ASP and uses a CDO.Message object. ...
1
by: Hello | last post by:
Scenario: A page creates a pop up and that pop up submits a form. Is there a way to detect whether the submitting was successful or not, so true/false could be passed to the parent window?
7
by: -Nacho- | last post by:
Hi group I have a form with fields for NAME and SURNAME. I need them in different fields, but I also need to submit them as a unique field "COMPLETENAME". Is there any way to "capture" them when...
4
by: Super Steve | last post by:
I'm trying to write a little script that disables the submit button on a form, changes the text of the button, and then submits the form. Can anyone tell me why this works ok: <input...
18
by: NavinM | last post by:
I have a couple of forms that are misbehaving in FireFox, but work fine in IE. when i do submit( with submit button) a javascript function validates all of the fields entered, and stops the...
1
by: dittu | last post by:
How to close the popup window when submitting the form? I have a sample.jsp. In that page one button is there. when button pressed, open popup window contains one "text box" and one " submit...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.