Will Tomlinson wrote:
Can you wrap a query with cftry inside a cftransaction?
Yes. It won't do anything for you unless you put an explicit commit in the
catch (in which case the behaviour is 'implementation defined' so check your DB
documentation) so I would recommend against it.
Jochem
Figured someone would know and answer quicker than me testing this.
Can you wrap a query with cftry inside a cftransaction?
Thanks,
Will
I do this all the time in my CFCs...
cftransaction
cftry
cfquery
!--- Query here ---
/cfquery
cfquery
Figured someone would know and answer quicker than me testing this.
Can you wrap a query with cftry inside a cftransaction?
Thanks,
Will
~|
Introducing the Fusion Authority Quarterly Update. 80 pages of hard-hitting,
up
Figured someone would know and answer quicker than me testing this.
Can you wrap a query with cftry inside a cftransaction?
Thanks,
Will
I do this all the time in my CFCs...
cftransaction
cftry
cfquery
!--- Query here ---
/cfquery
cfquery
/cftransaction
Will Tomlinson wrote:
Figured someone would know and answer quicker than me testing this.
Can you wrap a query with cftry inside a cftransaction?
Thanks,
Will
~|
Introducing the Fusion Authority Quarterly
We do it like this:
cftransaction action=begin isolation=serializable
cftry
!--- [mjh] Query here: ---
cfquery
...
/cfquery
cftransaction action=commit /
cfcatch
cftransaction action=rollback /
cfdump var=#cfcatch#
cfabort
6 matches
Mail list logo