Natively creating GUID values for Access 2000

G

guru_ross

Problem: I need to generate GUIDs (32 character globally uniqu
hexadecimal strings representing a 128bit value) in an Access 200
environment. I can not use Autonumber fields. Using embedded VBA i
highly undesirable.

I have looked all over and can not find any built-in SQL methods
techniques, etc to do this, which is crazy because they hav
StringFromGUID and GUIDFromString methods for working with Autonumbe
fields. I just need a function that creates a value equivelent to a
Autonumber field, that I can then work with in my SQL query (via AD
2.7).

The alternative solution is to generate the GUID values externally i
my executable code that is accessing the database, however that will b
much slower and will involve extra trips to and from the database.

Has anyone found any native Access solutions?

Thanks,
-Ros
 
S

Sylvain Lafontaine

Another snippet that I've just found in m.p.a.adp.sqlserver:

Dim x As Object
Dim strNewGUID As String
Set x = CreateObject("Scriptlet.TypeLib")
strNewGUID = Left(x.Guid, 38)

--
Sylvain Lafontaine, ing.
MVP - Technologies Virtual-PC
E-mail: http://cerbermail.com/?QugbLEWINF


Sylvain Lafontaine said:
 
Top