Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to Create a GUID

Status
Not open for further replies.

MagnusFox

IS-IT--Management
Jan 12, 2001
51
US
Good day,

Is there a function that can be run on the web server to create a GUID?

Something like:

Response.Write CreateGUID()

Many thanks
 
A GUID for a database (I don't see why you would need one for a web page)?
Depending on your database there is generally a functionj to handle this for you, for example in SQL Server you can create a GUID field by making the value of the field equalt to the function NewID() which creates a GUID by using an algorithm based on your system time (in milliseconds) and your network card hardware ID.

If you didn't mean for a database, could you be more specific on why you need it for a website? I don't think there is a built in ASP command for this, but it could be that I just never ran into it.

-Tarwn ________________________________________________
Get better results for your questions: faq333-2924
Frequently Asked ASP Questions: faq333-3048
 
I do really want to use it on the web server side. I have used the GUID for AutoNumber fields in DBs in the past. Works great. I just wanted to see if there was a way to make one on the web server.

I, like Tarwn, have not seen it, but would be nice to hear a definite "Absolutely Not Possible" from someone in the know.
 
I'm not sure that anyone would be able to say "No not possible" by knowing...
It is possible to have used it and know it does exist,
but if it doesn't exist, there is no way to conclusively say "Not it doesn't exist" because no one has seen all the source code for VBScript and all related packages.

So how about, "I am pretty darn sure it doesn't exist as part of the standard language package gbut it could be duplicated by writing your own component."

-Tarwn

ps - sorry, in a silly mood, the first part was jest, the last line would actually be a solution.
________________________________________________
Get better results for your questions: faq333-2924
Frequently Asked ASP Questions: faq333-3048
 
I agree Tarwn. The only solution I see is to do an odd job with session Id and time. Water is not bad as long as it stays out human body ;-)
 
Well, good enough for me. I will implement it another way. No big deal, just would be nice.

Off to the next challange then. 'Til next we meet again for assitance, thanks!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top