I've done something similar with hex values.  I coded a loop that created a
hex value, queried the database for a match, exited if one didn't exist and
repeated the loop if one did.  I then saved the hex value after the loop.

On Feb 11, 2008 4:39 PM, Les Irvin <[EMAIL PROTECTED]> wrote:

> Is there a slick way to do this in CF?  Let's say I have a set of
> records - one field of which is for a unique and random 6 digit
> number.  When adding a new record, what the best way to assign its
> random number that's not already assigned to another record?
>
> Thanks in advance,
> Les
>
> 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;160198600;22374440;w

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:298748
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4

Reply via email to