Yep, 

An identity is unique (unless dupes are allowed), but you could also use a
MS SQL  UUID by using the following :  select newID()



-----Original Message-----
From: Gene Brown [mailto:[EMAIL PROTECTED] 
Sent: 17 August 2004 08:28
To: [EMAIL PROTECTED]
Subject: RE: [ cf-dev ] unique order no

Paul,

I presume you are using a database so I would use a numeric column in the
database set it to be a Primary Key and set the Identity to Yes.

You can then Seed the Identity with what ever value you like, set the
Increment (usually 1) and you are guaranteed unique order number every time
you write an order into the database.

It is also quicker than using CF to generate an ID and then query the DB to
make sure it is unique.

To grab the NEW Order ID to write out any line items or other related date
use SELECT @@IDENTITY AS variable_name


HTH
Gene


-----Original Message-----
From: Paul Swingewood [mailto:[EMAIL PROTECTED] 
Sent: 16 August 2004 17:48
To: [EMAIL PROTECTED]
Subject: [ cf-dev ] unique order no

Can anyone help with this please.
I want to generate a unique order no. I was using <CFSET NewID =
CreateUUID()> but the number it generates is way too long. I was thinking of
creating something based on teh date and an incrementing number. Any ideas
on how to do this?

Regards - Paul



--
These lists are syncronised with the CFDeveloper forum at
http://forum.cfdeveloper.co.uk/
Archive: http://www.mail-archive.com/dev%40lists.cfdeveloper.co.uk/
 
CFDeveloper Sponsors and contributors:-
*Hosting and support provided by CFMXhosting.co.uk* :: *ActivePDF provided
by activepdf.com*
      *Forums provided by fusetalk.com* :: *ProWorkFlow provided by
proworkflow.com*
           *Tutorials provided by helmguru.com* :: *Lists hosted by
gradwell.com*

To unsubscribe, e-mail: [EMAIL PROTECTED]


-- 
These lists are syncronised with the CFDeveloper forum at
http://forum.cfdeveloper.co.uk/
Archive: http://www.mail-archive.com/dev%40lists.cfdeveloper.co.uk/
 
CFDeveloper Sponsors and contributors:-
*Hosting and support provided by CFMXhosting.co.uk* :: *ActivePDF provided
by activepdf.com*
      *Forums provided by fusetalk.com* :: *ProWorkFlow provided by
proworkflow.com*
           *Tutorials provided by helmguru.com* :: *Lists hosted by
gradwell.com*

To unsubscribe, e-mail: [EMAIL PROTECTED]
This e-mail is from Reed Exhibitions (Oriel House, 26 The Quadrant,
Richmond, Surrey, TW9 1DL, United Kingdom), a division of Reed Business,
Registered in England, Number 678540.  It contains information which is
confidential and may also be privileged.  It is for the exclusive use of the
intended recipient(s).  If you are not the intended recipient(s) please note
that any form of distribution, copying or use of this communication or the
information in it is strictly prohibited and may be unlawful.  If you have
received this communication in error please return it to the sender or call
our switchboard on +44 (0) 20 89107910.  The opinions expressed within this
communication are not necessarily those expressed by Reed Exhibitions.
Visit our website at http://www.reedexpo.com

-- 
These lists are syncronised with the CFDeveloper forum at 
http://forum.cfdeveloper.co.uk/
Archive: http://www.mail-archive.com/dev%40lists.cfdeveloper.co.uk/
 
CFDeveloper Sponsors and contributors:-
*Hosting and support provided by CFMXhosting.co.uk* :: *ActivePDF provided by 
activepdf.com*
      *Forums provided by fusetalk.com* :: *ProWorkFlow provided by proworkflow.com*
           *Tutorials provided by helmguru.com* :: *Lists hosted by gradwell.com*

To unsubscribe, e-mail: [EMAIL PROTECTED]

Reply via email to