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 level

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:

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

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. Jochem

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

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 is one of ColdFusion's slickest features

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-20 Thread Bryan Stevenson
I'm having trouble seeing why you need a loop for this?? Can you explain? From your description I would think you'd follow these steps (conditional statements and not loops): 1) set your random number (as you have) 2) run a query to see if that number is used in either table (simple SELECT

RE: Unique random number?

2003-03-20 Thread webguy
The CreateUUID() might be usefull if you don't need it to be an int. Otherwise I would create an other table to produce your key like ... [index_table][key] / \ /\ [table1][key] [table2][key] WG -Original Message- From: [EMAIL

RE: Unique random number?

2003-03-20 Thread Ezine
Eventually though..this will cause a page to loop many times.. and run the Query many times increasing load time and processor time. -Zine -Original Message- From: Bryan Stevenson [mailto:[EMAIL PROTECTED] Sent: Thursday, March 20, 2003 1:14 PM To: CF-Talk Subject: Re: Unique random

RE: Unique random number?

2003-03-20 Thread Barney Boisvert
cfloop condition=true cfset job_number = randRange(1, 10) / cfquery name=checkopen SELECT count(job_number) FROM openjobs WHERE job_number = #job_number# /cfquery cfquery name=checkclose SELECT count(job_number) FROM closejobs WHERE

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
-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 to loop many times.. and run the Query many times increasing load time

RE: Unique random number?

2003-03-20 Thread Joshua Miller
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 to loop many times.. and run the Query many times increasing