I wouldn't say that the method you suggest is safe.  I'd suggest you do one
of two things:

1. Wrap your two queries in a <CFTRANSACTION>.
2. Write a stored procedure that starts a transaction, does the read, does
the update, commits the transaction and returns the number to your program.

If it were me, I'd do number 2.

Bob

-----Original Message-----
From: Jon Hall [mailto:[EMAIL PROTECTED]]
Sent: Monday, December 11, 2000 6:39 PM
To: CF-Talk
Subject: Is SQL Server FIFO?


I was told that SQL Server processes all SQL statements FIFO, so I dont need
to use cflock around a query statement that pulls the counter record for a
banner program i am working on.

In my template, I pull the current number of hits, then I add one and then
update the record.

Is this true?

jon
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to