Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Submitting form with a unique ID

Reply
Thread Tools

Submitting form with a unique ID

 
 
James Brown
Guest
Posts: n/a
 
      07-05-2003
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
 
Reply With Quote
 
 
 
 
Jeff Louie
Guest
Posts: n/a
 
      07-05-2003
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!
 
Reply With Quote
 
 
 
 
David Waz...
Guest
Posts: n/a
 
      07-06-2003
Using a system generated GUID is quick and easy, although kinda long.
16 bytes minimum.



"James Brown" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed) 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



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Is there a unique method in python to unique a list? Token Type Python 9 09-09-2012 02:13 PM
Form within a Form - will it cause problems when submitting? Dave Smithz HTML 3 10-30-2009 07:24 AM
list question... unique values in all possible unique spots ToshiBoy Python 6 08-12-2008 05:01 AM
Submitting form from another frame does not run onsubmit of that form Kai Grossjohann Javascript 4 12-09-2003 02:49 PM
submit opener form after submitting pop-up form Marco Alting Javascript 7 10-30-2003 01:46 PM



Advertisments