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
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
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
>
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
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
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
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
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
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
> 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
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
> 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:
> 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
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
> 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
> > 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
> 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
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.
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
> 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
20 matches
Mail list logo