TIP: Creating a GUID in VBscript without using a component

Posted Thu, Jan 5 2006 12:01 PM by Mischa Kroon

Another simple tip:
Creating a GUID without a component.

This can be done by using SQL Server as a way to generate a GUID.
SELECT NEWID();

Retrieves a GUID.

Offcourse it's also possible to use .Net or a Component to do this like with the free GUIDmaker component from Serverobjects:
http://www.serverobjects.com/products.htm

 

 

 

Comments

# re: TIP: Creating a GUID in VBscript without using a component

Thursday, January 05, 2006 9:46 AM by Ramon Smits

or call uuidgen.exe :)

# re: TIP: Creating a GUID in VBscript without using a component

Friday, January 06, 2006 12:18 AM by Jan Schreuder

Assuming there's a SQL server connecttion available of course :-)

# re: TIP: Creating a GUID in VBscript without using a component

Wednesday, January 11, 2006 3:49 AM by Erwyn van der Meer

Or use Tools | Create GUID in Visual Studio 2003 or 2005.

# re: TIP: Creating a GUID in VBscript without using a component

Saturday, January 14, 2006 4:02 AM by Mischa Kroon

The options of uuidgen.exe and tools-create GUID.

Aren't really options that I would look for.

If I would want to do it through an external dependency I would go with installing a COM component to do it's job.

the project where I needed the GUID's was a project in which a MSSQL 2000 server was used with GUID identity columns using ASP 3 (vbscript) as a scripting language.

So in this case neither options would work very well :)

# re: TIP: Creating a GUID in VBscript without using a component

Wednesday, September 24, 2008 2:13 AM by Todd W. Powers

This is actually possible, directly from VBScript, without SQL, or any COM component.  Check the following article for more information:

www.microsoft.com/.../hey0221.mspx

Leave a Comment

(required) 
(required) 
(optional)
(required) 
Please add 5 and 5 and type the answer here: