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]

Reply via email to