Unique random number?

2003-03-20 Thread Robert_Myers
Need to set a job number to a unique number, based of creating a number using the RandRange function, but then I need to take that number and bounce it off two access tables (called openjobs & closejobs) to see if that random number is already used, then loop back if it is to start over, but if it

Unique random number?

2003-03-22 Thread lee
Be careful if you deploy this method -- make sure you wrap the initial query (maxID) and the insert of the new ID in a transaction tag, otherwise you could run into conflicts with identical IDs. Best to have the database handle this. The date+random num is a good second choice; chances are ther

Re: Unique random number?

2003-03-20 Thread Bryan Stevenson
er & Director www.cfug-vancouverisland.com - Original Message - From: <[EMAIL PROTECTED]> To: "CF-Talk" <[EMAIL PROTECTED]> Sent: Thursday, March 20, 2003 9:55 AM Subject: Unique random number? > Need to set a job number to a unique number, based of creating a number >

RE: Unique random number?

2003-03-20 Thread webguy
EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: 20 March 2003 17:56 To: CF-Talk Subject: Unique random number? Need to set a job number to a unique number, based of creating a number using the RandRange function, but then I need to take that number and bounce it off two access tables (called ope

RE: Unique random number?

2003-03-20 Thread Ezine
er & Director www.cfug-vancouverisland.com - Original Message - From: <[EMAIL PROTECTED]> To: "CF-Talk" <[EMAIL PROTECTED]> Sent: Thursday, March 20, 2003 9:55 AM Subject: Unique random number? > Need to set a job number to a unique number, based of creating a number

RE: Unique random number?

2003-03-20 Thread Barney Boisvert
ent: Thursday, March 20, 2003 9:56 AM > To: CF-Talk > Subject: Unique random number? > > > Need to set a job number to a unique number, based of creating a number > using the RandRange function, but then I need to take that number and > bounce it off two access tables (called

Re: Unique random number?

2003-03-20 Thread Thane Sherrington
At 11:55 AM 3/20/03 -0600, [EMAIL PROTECTED] wrote: >Need to set a job number to a unique number, based of creating a number >using the RandRange function, but then I need to take that number and Why not just make the number the next number in sequence? Just find the highest number used as a W/O

Re: Unique random number?

2003-03-20 Thread Bryan Stevenson
Director www.cfug-vancouverisland.com - Original Message - From: "Ezine" <[EMAIL PROTECTED]> To: "CF-Talk" <[EMAIL PROTECTED]> Sent: Thursday, March 20, 2003 10:18 AM Subject: RE: Unique random number? > Eventually though..this will cause a page

RE: Unique random number?

2003-03-20 Thread Joshua Miller
y return e-mail to [EMAIL PROTECTED] * -Original Message- From: Bryan Stevenson [mailto:[EMAIL PROTECTED] Sent: Thursday, March 20, 2003 1:30 PM To: CF-Talk Subject: Re: Unique random number? Nobody said the initial logic was good

RE: Unique random number?

2003-03-22 Thread Dave Watts
> CFTRANSACTION is one of ColdFusion's slickest features. > Much easier than database-level transaction handling. I don't see why you'd say it's any easier, really. It's easy enough to do this in a stored procedure: BEGIN TRANSACTION ... your SQL DML statements ... COMMIT TRANSACTION Dave Watts

RE: Unique random number?

2003-03-22 Thread Jim Davis
But hey - there's like twice as many letters in that! ;^) Jim Davis > -Original Message- > From: Dave Watts [mailto:[EMAIL PROTECTED] > Sent: Sunday, March 23, 2003 1:47 AM > To: CF-Talk > Subject: RE: Unique random number? > > > > CFTRANSACTION

RE: Unique random number?

2003-03-22 Thread Dave Watts
> But hey - there's like twice as many letters in that! ;^) Yes, but just think of the savings in angle brackets! Dave Watts, CTO, Fig Leaf Software http://www.figleaf.com/ voice: (202) 797-5496 fax: (202) 797-5444 ~| Archives:

RE: Unique random number?

2003-03-23 Thread Philip Arnold
> CFTRANSACTION is one of ColdFusion's slickest features. > Much easier than database-level transaction handling. Let's not forget that in a Clustered environment that CFTRANSACTION won't stop transactions from the other servers... That's where database level transactions blow away anything that

Re: Unique random number?

2003-03-23 Thread Jochem van Dieten
Philip Arnold wrote: >>CFTRANSACTION is one of ColdFusion's slickest features. >>Much easier than database-level transaction handling. > > Let's not forget that in a Clustered environment that CFTRANSACTION > won't stop transactions from the other servers... They do (if the transaction isolation

RE: Unique random number?

2003-03-23 Thread Philip Arnold
> They do (if the transaction isolation level warrants stopping > other transactions). In other words, stops all other traffic of that type on the database server... Now THAT's a way to kill a site ~| Archives: http://www.houseo

RE: Unique random number?

2003-03-23 Thread Dave Watts
> > They do (if the transaction isolation level warrants stopping > > other transactions). > > In other words, stops all other traffic of that type on the > database server... Now THAT's a way to kill a site I think you're missing Jochem's point, which is simply that if you have multiple servers

RE: Unique random number?

2003-03-23 Thread Philip Arnold
> I think you're missing Jochem's point, which is simply that > if you have multiple servers, CFTRANSACTION will work fine, > placing the requisite locks as needed. My problem with it is that if you put 3-4 queries inside a CFTRANSACTION instead of using one TSQL transaction, then it'll have to "d

Re: Unique random number?

2003-03-23 Thread Jochem van Dieten
Philip Arnold wrote: >>They do (if the transaction isolation level warrants stopping >>other transactions). > > In other words, stops all other traffic of that type on the database > server... Now THAT's a way to kill a site That can be desired behaviour if the alternative is inconsistent data.

Re: Unique random number?

2003-03-23 Thread Jochem van Dieten
Philip Arnold wrote: > > My problem with it is that if you put 3-4 queries inside a CFTRANSACTION > instead of using one TSQL transaction, then it'll have to "deadlock" the > DB Server for it to handle the transaction properly Maybe for MS SQL Server, but databases that do "better than row level

RE: Unique random number?

2003-03-23 Thread Philip Arnold
> in fact, it said Access, so TSQL is not really an option and > I don't know what transaction mechanism it uses Ah, I missed that, and not knowing the latest Access, I don't even know if it has any form of TSQL I have a tendency to avoid CFTRANSACTION because of the overhead, and potential probl