createUID() uses ActionScript's Math.random() to generate 24 of the 32
bytes of the UID; the other 8 are determined from the current date-time.
The chance that these UIDs wouldn't be good enough for database keys is
very small. But just in case, couldn't you simply call createUID() again
if the database errored because a new row didn't have a unique key?
 
- Gordon
 
________________________________

From: [email protected] [mailto:[EMAIL PROTECTED] On
Behalf Of scott_flex
Sent: Tuesday, March 06, 2007 1:36 PM
To: [email protected]
Subject: [flexcoders] Re: Not able to generate GUID




My initial concerns was that it would give a true GUID. 

This statement from the Flex Live docs on adobe.com states: "This UID 
will not be truly globally unique; but it is the best we can do 
without player support for UID generation."

Maybe i'm reading that wrong... but i'm not getting the sense that I 
can guarantee these numbers to be unique across the board and be used 
to uniquely identify rows in a database... either as the primary key 
itself but most likely to determine the PK based on the rowGUID 
column.

--Scott

--- In [email protected] <mailto:flexcoders%40yahoogroups.com>
, "Gordon Smith" <[EMAIL PROTECTED]> wrote:
>
> What are your concerns regarding createUID()?
> 
> - Gordon
> 
> ________________________________
> 
> From: [email protected] <mailto:flexcoders%40yahoogroups.com>

[mailto:[email protected] <mailto:flexcoders%40yahoogroups.com>
] On
> Behalf Of scott_flex
> Sent: Monday, March 05, 2007 4:57 PM
> To: [email protected] <mailto:flexcoders%40yahoogroups.com> 
> Subject: [flexcoders] Not able to generate GUID
> 
> 
> 
> 
> Is there no function or object to generate a GUID, a true globally 
> unique identifier?
> 
> the createUID is not what i'm looking for, just figured generating 
a 
> GUID would be something pretty basic.
>



 

Reply via email to