The dbms needs to support it, but yeah it's known. I guess the only limit
would be the amount of time you want that connection open to the database
server.
It is not the equivalent to a transaction. I thought so also until Dave
Watts corrected me a little while ago ;-)
Each different command between the <cfquery> tags is it's own seperate
transaction. Same as in a stored procedure.
You have (I'm almost sure) three transactions in the below statement. In
order to make all of the below statements a single transaction, put BEGIN
TRANSACTION at the beginning, and COMMIT TRANSACTION at the end.

As you have it now, two concurrent users could execute the cfquery at the
same time, and potentially get unpredictable results. What happens if they
both hit it at the same time and the two updates run before either of the
selects? @max is probabaly going to be off...

jon
----- Original Message -----
From: "Paul Smith" <[EMAIL PROTECTED]>
To: "CF-Talk" <[EMAIL PROTECTED]>
Sent: Wednesday, May 09, 2001 9:36 PM
Subject: SQL 7 Question


> I've been putting one SQL statement after another like the following
inside
> a CFQUERY for a while.  Seems to work fine.
>
> UPDATE MAX_ID_Clients SET MAX_ID_Client = MAX_ID_Client + 1
> DECLARE @MAX INT
> SELECT @MAX = MAX_ID_Client FROM MAX_ID_Clients
> INSERT INTO ClientData(CFID,CFTOKEN)
> VALUES(@MAX,#CFT#)
>
> Is this a known feature?
>
> Is there a limit to how many SQL statements can be combined this way?
>
> I assume the above is equivalent to a CFTRANSACTION.  Is this so?
>
> best,  paul
>
>
>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to