Sounds like a popular table on the database. Try using cftry cfcatch blocks
around your queries and then you can use cftransaction to determine whether
the query ran successfully, if not go to the appropriate cfcatch block and
either roll back the transaction or retry. Here is the example from the
studio help file.
<CFTRY>
<----------------------------------------------------------------------
Initialize commitIt to Yes.
----------------------------------------------------------------------->
<CFSET commitIt = "Yes">
<CFTRANSACTION ACTION="BEGIN">
<CFQUERY NAME='makeNewCourse' DATASOURCE='cfsnippets'>
INSERT INTO Courses
(Number, Descript)
VALUES
('#myNumber#', '#myDescription#')
</CFQUERY>
<!------------------------------------------------------------------
Rolls back the pending insertion if database exception is caught.
------------------------------------------------------------------->
<CFCATCH TYPE="DATABASE">
<CFTRANSACTION ACTION="ROLLBACK"/>
<CFSET commitIt = "No">
</CFCATCH>
<CFIF commitIt>
<CFTRANSACTION ACTION="COMMIT"/>
<!--------------------------------------------------------------
Commits the pending insertion.
---------------------------------------------------------------->
<CFELSE>
<CFSET commitIt="Yes">
</CFIF>
<CFQUERY NAME='insertNewCourseToList' DATASOURCE='cfsnippets'>
INSERT INTO CourseList
(CorNumber, CorDesc, Dept_ID,
CorName, CorLevel, LastUpdate)
VALUES
('#myNumber#', '#myDescription#', '#myDepartment#',
'#myDescription#', '#myCorLevel#', #Now()#)
</CFQUERY>
<!------------------------------------------------------------------
Rolls back the pending insertion if database exception is caught.
------------------------------------------------------------------->
<CFCATCH TYPE="DATABASE">
<CFTRANSACTION ACTION="ROLLBACK"/>
<CFSET commitIt = "No">
</CFCATCH>
<CFIF commitIt>
<CFTRANSACTION ACTION="COMMIT"/>
<!--------------------------------------------------------------
Commits the pending insertion.
---------------------------------------------------------------->
<CFELSE>
<CFSET commitIt="Yes">
</CFIF>
</CFTRANSACTION>
</CFTRY>
----- Original Message -----
From: "Joseph Eugene" <[EMAIL PROTECTED]>
To: "CF-Talk" <[EMAIL PROTECTED]>
Sent: Thursday, February 15, 2001 10:38 PM
Subject: Dead Locks???
> Hi all,
> I am getting Process ID# dead locks from Sql Server. This has
> been happening lately
> for a month or so but its quite often. Does anybody know why i
> am getting these errors?
> or are there any recomended solutions for this?
> Appreciate any help.
> Thanks
> Joe
>
>
>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
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