Hi All

cftransaction "Not in local manual transaction mode"

I've had this error before (unsolved) but then I was doing silly things
with CFC's and transactions

but what's wrong with this (code below)?

and what does " Not in local manual transaction mode" actually mean?

I've got an additional question on where to put the COMMIT, keeping in
mind what the CFIF is doing (ie: inside or outside the CFIF)

any thoughts?
thanx
barry.b


<cfset var result = "false">
<cftransaction action="BEGIN">
<cftry> 
<cfquery name="qry" datasource="#dsn#">
        select '' as found from pstudaddr
        WHERE cmpy_code = 
                <cfqueryparam cfsqltype="CF_SQL_CHAR" 
                        value="#arguments.CompanyCode#">
        AND add_num = 
                <cfqueryparam cfsqltype="CF_SQL_CHAR" 
                        value="#arguments.data.ADDR_CODE#">             
</cfquery>

<cfif not qry.recordcount><!--- not found, OK to delete --->
        <cfquery name="qry" datasource="#dsn#">
                DELETE * FROM psraddrname
                WHERE cmpy_code = 
                <cfqueryparam cfsqltype="CF_SQL_CHAR" 
                        value="#arguments.CompanyCode#">
                AND ADDR_CODE = 
                <cfqueryparam cfsqltype="CF_SQL_CHAR" 
                        value="#arguments.data.ADDR_CODE#">
        </cfquery>

        <cftransaction action="COMMIT" />
        <cfset result = "true">
</cfif>

<cfcatch>
        <cftransaction action="ROLLBACK" />
        <cfrethrow>
</cfcatch>
</cftry>
</cftransaction>                



---
You are currently subscribed to cfaussie as: [EMAIL PROTECTED]
To unsubscribe send a blank email to [EMAIL PROTECTED]
Aussie Macromedia Developers: http://lists.daemon.com.au/

Reply via email to