TUniqueIDGenerator

Thanks for downloading TUniqueIDGenerator, I hope this component is useful to you.

Description:

I developed TUniqueIDGenerator because I was tired of constantly creating a function to generate a unique ID of some sort or another. This component allows virtually any unique number be generated in an endless amount of formats. The component works similarly to the FormatFloat function, in that it accepts any string as a format, then looks for the specified format characters.

Installation:

Click Componentsà Install then select the UniqueIDGenerator.DCU file.

Usage:

Just set the format property at design or run-time and call the GenerateID function. If you need to generate a GUID, just call the NewGUID function. For memory’s sake (yours that is, J ) if you change the About property to True at design time a dialog pops up reminding you of the available formats.

Available Format Characters:

x = Generates a random lower case letter (range a..z)
X = Generates a random upper case letter (range A..Z)
Z = Generates any letter or number (range A..Z, a..Z, 0..9)
z = Generates a random upper case letter or number (range A..Z or )
# = Generates a random number (range 0..9)

Any other characters will be returned verbatim.

Examples:

Format

Sample Result

ORD####

ORD6945

{ZZZZ-####-ZZZZ-####}

{aR4dZ-6548-aRr6-9465}

Contact Information:

You can reach me at dlederman@ssccompany.com