thanx for your interest, Andrew.

it turned out to be a dumb-arsed thing. the syntax of the delete:

DELETE FROM psraddrname 
not
DELETE * FROM psraddrname

D'oh!!! I've been caught by this before with this db/odbc driver. I
blame it on "Friday"

but that prompts a question: is there any real difference between these
two versions? 

ie the CFTRY before the CFTRANSACTION  - OR - the other way around? the
seem to both work (now that my brains have kicked in)

thanx
barry.b

<!----
<cfset result = "false" />              
<cftry>
<cftransaction action="BEGIN">  
        <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>
                
                <cfset result = "true">
        </cfif>
        <cfif result EQ "true">
                <cftransaction action="COMMIT" />
        <cfelse>
                <cftransaction action="ROLLBACK" />
        </cfif>
</cftransaction>        
        <cfcatch>
                <cfrethrow>
        </cfcatch>
</cftry>

--->
<!---======================================--->

<cfset 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>






-----Original Message-----
From: Andrew Scott [mailto:[EMAIL PROTECTED] 
Sent: Friday, 16 July 2004 1:01 PM
To: CFAussie Mailing List
Subject: [cfaussie] RE: cftransaction "Not in local manual transaction
mode"

Barry,

I can't say that I have seen this before (the error that is) but have
you
tried having the cftransaction within the cftry block at all...

 
Regards
Andrew Scott
Technical Consultant

NuSphere Pty Ltd
Level 2/33 Bank Street
South Melbourne, Victoria, 3205

Phone: 03 9686 0485  -  Fax: 03 9699 7976


-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Barry
Beattie
Sent: Friday, 16 July 2004 11:19 AM
To: CFAussie Mailing List
Subject: [cfaussie] cftransaction "Not in local manual transaction mode"

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




---
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/


---
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