Say I have code that is accesses multiple datasources. CFTransaction cannot be
used across multiple datasources.
My question is can I make two CFTransaction blocks and on the first one set a
CFTransaction SavePoint.
Then if the second CFTransation errors can I roll back the first
Say I have code that is accesses multiple datasources. CFTransaction cannot
be used across multiple datasources.
My question is can I make two CFTransaction blocks and on the first one set a
CFTransaction SavePoint.
Then if the second CFTransation errors can I roll back the first
Bump... Casey - is this method thread safe?
-Original Message-
From: Brook Davies [mailto:cft...@logiforms.com]
Sent: December-13-11 10:15 PM
To: cf-talk
Subject: RE: cftransaction isolation=repeatable_read
So this would update and select the rows at the same time? Would I need to
use
So this would update and select the rows at the same time? Would I need to
use transaction or would this guarantee if another request for the same
query at the exact same time happened, it would not return or update the
same rows?
The INSERTED scope corresponds to the record you're updating,
I am using cftransaction isolation=repeatable_read to single thread
access to scheduled tasks that live in a DB table. This application spawns
multiple servers, and each server is set to poll the scheduled task table
every 3 minutes. It grabs the tasks and executes them.
Now
On Tue, Dec 13, 2011 at 6:13 PM, Brook Davies cft...@logiforms.com wrote:
I guess my question is, will this lead to performance problems? Is there a
more elegant way to do this?
Are you using MS SQL server? If so you only need one query which will still
output rows like the first query with
...@uberwebsitesolutions.com]
Sent: December-13-11 6:29 PM
To: cf-talk
Subject: Re: cftransaction isolation=repeatable_read
On Tue, Dec 13, 2011 at 6:13 PM, Brook Davies cft...@logiforms.com wrote:
I guess my question is, will this lead to performance problems? Is
there a more elegant way
cftransaction
isolation=READ_COMMITTED
~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive:
http://www.houseoffusion.com/groups/cf-talk/message.cfm
I thought that would be the case as well after researching a bit
further, but I haven't been able to get the two to finish at the same
time. Could just be a timing thing. The code that is executed once
the XML response is returned is quite lengthy, performing a number of
checks and rolling up
well don;t forget that CF now has debugging again, so you could use
cfeclipse to step through and see what is happening.
I wouldn't expect 2 concurrent requests to run exactly the same, as
presumably each would be working on different data surely ?
On Tue, Nov 1, 2011 at 11:22 AM, Matt Blatchley
Very true. Thanks Russ.
~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive:
On Tue, Nov 1, 2011 at 1:13 AM, Matt Blatchley wrote:
Microsoft SQL Server 2008 (SP1)
Standard Edition (64-bit) on Windows NT 5.2 (Build 3790: Service Pack 2)
Database table stores the Metrics by daily values so it's constantly
being hit by the imported data and the user interface.
That is
That is what snapshot isolation is designed for:
http://msdn.microsoft.com/en-us/library/tcbchxcb%28v=vs.80%29.aspx
Great information, thank you Jochem.
~|
Order the Adobe Coldfusion Anthology now!
. And I need to somehow cut that time in half.
So my question is this: Is it possible to have multiple queues
running on different machines and dumping the data into the same
table?
Using cftransaction, the second queue attempts to run but has to wait
until the main Queue finishes before
question is this: Is it possible to have multiple queues
running on different machines and dumping the data into the same
table?
Using cftransaction, the second queue attempts to run but has to wait
until the main Queue finishes before the secondary queue starts. I've
read into the Isolation
On Mon, Oct 31, 2011 at 8:56 PM, Matt Blatchley wrote:
So my question is this: Is it possible to have multiple queues
running on different machines and dumping the data into the same
table?
Yes.
Using cftransaction, the second queue attempts to run but has to wait
until the main Queue
:56 PM, Matt Blatchley wrote:
So my question is this: Is it possible to have multiple queues
running on different machines and dumping the data into the same
table?
Yes.
Using cftransaction, the second queue attempts to run but has to wait
until the main Queue finishes before the secondary
what type of cftransaction are you using, do u have cflocking as well,
if so what type.
are you really using Windows NT ? i'm pretty sure the minimum
requirements for SQL Server 2008 is windows 2003 server.
Russ
~|
Order
Win2003 Standard
I removed the cflock and I'm currently using cftransaction
isolation=READ_COMMITTED
~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag
Hello all. Question regarding cftransaction and commit action.
cftransaction
cftry
cfloop file
cfquery insert
cfquery update
/cfloop
cfcatchgenerate error message/cfcatch
/cftry
cfif error message is null or override commit=1
cftransaction commit
cfelse
cftransaction rollback
button to allow
You may just need to close the tag
cftransaction commit /
you are also missing a /cfif
On Fri, Mar 25, 2011 at 3:25 PM, ike Savino msav...@optiontrax.com wrote:
Hello all. Question regarding cftransaction and commit action.
cftransaction
cftry
cfloop file
cfquery insert
cfquery
Hello, ran into this one today.
I have a CFTransaction surrounding some queries that insert data.
I am using a CFC function to get shipping total:
cfprocparam dbvarname=@ShippingTotal value=#CartObj.GetCartShipping()#
cfsqltype=cf_sql_numeric
That function needs to query a different database
Original Message
Subject: cftransaction and multiple databases
From: Chad Gray cg...@careyweb.com
Date: Wed, March 24, 2010 3:05 pm
To: cf-talk cf-talk@houseoffusion.com
Hello, ran into this one today.
I have a CFTransaction surrounding some queries that insert data
On Wed, Mar 24, 2010 at 9:05 PM, Chad Gray wrote:
Datasource FOO verification failed.
The root cause was that: java.sql.SQLException: Datasource names for all the
database tags within the cftransaction tag must be the same.
How can I get around this error? The function is just doing
I figured out a work around. I made a view of the table.
So now all my tables inside of the CFTransaction are in the same database.
Chad
-Original Message-
From: Chad Gray [mailto:cg...@careyweb.com]
Sent: Wednesday, March 24, 2010 4:05 PM
To: cf-talk
Subject: cftransaction
Thanks everyone - looks like the sproc is indeed committing on the backend. I
do miss writing my own queries...
~|
Want to reach the ColdFusion community with something they want? Let them know
on the House of Fusion mailing
Hi all, I understand the gist of cftransaction, but I've tried using it with a
conditional rollback on an action page in the below example and it doesn't seem
to work. saveDataToDatabase() submits data to a stored procedure, which always
returns a string: empty string if the data was saved
: Christophe Maso [mailto:zum...@hotmail.com]
Sent: Friday, December 11, 2009 10:12 AM
To: cf-talk
Subject: cftransaction
Hi all, I understand the gist of cftransaction, but I've tried using it with
a conditional rollback on an action page in the below example and it doesn't
seem to work
The way the code is written, the cfif will never be true because it will always
have br in so the length will never be below 4.
Hi all, I understand the gist of cftransaction, but I've tried using
it with a conditional rollback on an action page in the below example
and it doesn't seem
of cftransaction, but I've tried using
it with a conditional rollback on an action page in the below
example
and it doesn't seem to work. saveDataToDatabase() submits data to a
stored procedure, which always returns a string: empty string if the
data was saved, or a message
Good catch - you're right; I would normally include a cfif to append the return
string and the br to allReturnMessages only if the return string isn't
empty.
The stored proc was written by someone else, so I'm not 100% sure what's
happening with it, which is part of the problem. I suppose
The way the CFTransaction tag works is CF is putting the TRANSACTION statements
in the T-SQL it sends to the server. So the rollback tag will rollback any
transactions that haven't been committed. You could have 100's of queries
running with Inserts/deletes/updates and everything
I suppose what I should be asking is - is it even possible
to do what I'm trying to do?
Yes. Unless, as someone else mentioned, the procedure you are calling is using
its own transaction. Is it?
-Leigh
~|
Want
Dear Fellows,
I am trying to use CFTRANSACTION for a multiple insert query to the same
datasource but obviously different tables. Now my need is that if any one of
the INSERT query fails, all the other queries must be rolled-back. If all of
them succeed, then the complete transaction should
The CFTRANSACTION tag takes care of the top-level rollback all on it's
own. The explicit rollback is only used if you have logic inside the
CFTRANSACTION tag that needs to roll back because of some
non-exception situation. So you'll get the behaviour you want if you
remove the CFTRY..CFCATCH
Thanks Barney will try that out :)
I also found an old reply by you on a similar topic
RE: cftransaction cftry order
Barney Boisvert
Thu, 29 May 2003 09:43:52 -0700
:)
Regards,
Arsalan
--
From: Barney Boisvert bboisv...@gmail.com
Sent
looks like /cfcatch is missing
~|
Want to reach the ColdFusion community with something they want? Let them know
on the House of Fusion mailing lists
Archive:
???
!---//Starting Transaction -
cftransaction
cftry
!---//QUERY1 Insert
cfquery name=insertDAP datasource=#data2#
INSERT STATEMENT 1
/cfquery
!---//QUERY2 Insert
???
!---//Starting Transaction -
cftransaction
cftry
You're making this more complicated than it needs to be. As Barney
previously stated, you don't need the CFTRY or the explicit rollback
at all:
cftransaction
cfquery ... /
cfquery
Try putting your CFTRY / CFCATCH around the outside of the CFTRANSACTION
... the error handler is not triggering your roll-back, I would guess.
cftry
!---//Starting Transaction
-
cftransaction
!---//QUERY1 Insert
@houseoffusion.com
Subject: Re: CFTRANSACTION with MS Access Database
Try putting your CFTRY / CFCATCH around the outside of the CFTRANSACTION
... the error handler is not triggering your roll-back, I would guess.
cftry
!---//Starting Transaction
try / catch is still the right way to capture errors, but if it's inside
the transaction, then the TR won't fire.
if this isn't working, though, then I gotta question whether Access
supports transaction locking at all? It's been years since I used it, so I
can't vouch one way or the other
the errors
and get a notification if a database exception occurs without breaking the
flow of my page is there any alternate to CFCATCH/CFTRY for this
purpose?
You should be able to wrap the CFTRANSACTION itself in CFTRY/CFCATCH,
or use CFERROR with the page; if the transaction fails, you should get
: Re: CFTRANSACTION with MS Access Database
No guys this isn't working ... nor that what Barney and Dave
advised...
does anyone has a working example of such scenario? I would be very
thankful
if someone provides me with a somewhat similar working example
and yes... I am using
arsalk...@hotmail.com
Sent: Wednesday, July 29, 2009 1:00 AM
To: cf-talk cf-talk@houseoffusion.com
Subject: Re: CFTRANSACTION with MS Access Database
hey Dave... can you provide me with some literature or example code on
this
topic ... specially in regard to MS Access
Thanks for your comments. So long as I do not mess up my transactions because
of cfcs.
~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to
date
Get the Free Trial
Wondering if we can wrap cfc methods (with db queries) in a outer
cftransaction?? Any comments ???
~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to
date
Get the Free Trial
http
Yes, you can, so long as they all hit the same datasource.
Wondering if we can wrap cfc methods (with db queries) in a outer
cftransaction?? Any comments ???
~|
Adobe® ColdFusion® 8 software 8 is the most important
Yes, you can, so long as they all hit the same datasource.
Wondering if we can wrap cfc methods (with db queries) in a outer
cftransaction?? Any comments ???
I've heard that they've added the feature enhancement in CF9 that allows
you to nest cftransactions now. So if you have already
I cannot find this documented anywhere
although I see mention of it on blogs and forums.
A developer here uses the macromedia driver for stored proc support. In
her application she also uses cftransaction. I have asked that she supply
the database username and password in either her cftransaction
I was wondering if I can wrap a couple of functions(with queries) in a
cftransaction. Would this work? I mean if a function query fails, will the
transaction still roll back?
~|
Adobe® ColdFusion® 8 software 8 is the most
at 12:10 PM, Brian Dumbledore [EMAIL PROTECTED]
wrote:
I was wondering if I can wrap a couple of functions(with queries) in a
cftransaction. Would this work? I mean if a function query fails, will the
transaction still roll back
://www.dopefly.com/
On Thu, Mar 20, 2008 at 12:10 PM, Brian Dumbledore [EMAIL PROTECTED]
wrote:
I was wondering if I can wrap a couple of functions(with queries) in a
cftransaction. Would this work? I mean if a function query fails, will the
transaction still roll back
Matthew Chambers wrote:
I've just checked and the DB has been create with MyISAM. Am I in trouble?
Not with regard to this specific problem. Just use cftransaction and the
MySQL last_inserted_id() function.
In general though, don't expect any other benefits from transactions as
long as you
Hi guys,
I'm trying to find some up to date (MX7) info on how to correctly use
CFTRANSACTION when writing to a DB (MySQL). All I am doing is one CFQUERY for
the INSERT statement and then a second CFQUERY for the last_insert_id().
I think MySQL v5 allows you to have more than one SQL statement
to correctly use
CFTRANSACTION when writing to a DB (MySQL). All I am doing is one CFQUERY
for the INSERT statement and then a second CFQUERY for the last_insert_id().
I think MySQL v5 allows you to have more than one SQL statement per
CFQUERY however I'm using v4.
Cheers
Ok, but what CFTRANSACTION type do I use?
Cheers
Matthew
If msql4 supports transactions then you have no problems. That's what
transactions is all about, multiple queries that rely on one or another
failing, to summarise it up.
On 3/29/07, Matthew Chambers [EMAIL PROTECTED] wrote
If you are simply inserting a new record, then doing a select max type
operation to determine the id, you shouldn't need to specify the
isolation level, as the default will work...e.g.
cftransaction
cfquery name=whatever datasource=mydsn
INSERT INTO(.)
/cfquery
cfquery name=getMyWhateverID
] wrote:
If you are simply inserting a new record, then doing a select max type
operation to determine the id, you shouldn't need to specify the
isolation level, as the default will work...e.g.
cftransaction
cfquery name=whatever datasource=mydsn
INSERT INTO(.)
/cfquery
cfquery name
, then doing a select max type
operation to determine the id, you shouldn't need to specify the
isolation level, as the default will work...e.g.
cftransaction
cfquery name=whatever datasource=mydsn
INSERT INTO(.)
/cfquery
cfquery name=getMyWhateverID datasource=mydsn
SELECT MAX
Hi James,
I've just checked and the DB has been create with MyISAM. Am I in trouble?
Out of interest: I've just been reading the CF livedocs and it says;
serializable: places an exclusive lock on every data table in use for the
duration of the transaction. Causes access to the database to be
Thanks for the suggestion. For one of my sites I'm going to need to do
something along these lines, because the LOAD DATA function is disabled by the
host in the shared hosting environment. I need to import/update the data (a CSV
file that gets FTPed to the server) into a MySQL database a few
On 3/13/07, megan c wrote:
Thanks for the suggestion. For one of my sites I'm going to need to do
something along
It is EASY with cfhttp (if you've got well formed data), but I have
never load tested it.
or (not nearly as easy)
If you've got createObject power you can use HSSQLDB, which
It is EASY with cfhttp (if you've got well formed data), but I have
never load tested it.
or (not nearly as easy)
If you've got createObject power you can use HSSQLDB, which seems
pretty
robust for CSV stuff- but CFHTTP is probably fastest from 0 to Query.
The one advantage to
On 3/13/07, megan c wrote:
Thank you so much--this worked like a charm (once I realized that there
was a tab at the end of the lines mucking things up, that is).
Glad I could help!
~|
ColdFusion MX7 and Flex 2
Build
Does load data infile query of mysql doesnt work in cftransaction?
I'm curious... did you ever figure this out? I'm also trying to determine the
simplest/most efficient way of loading the data from a .csv file into a mysql
DB using CF
On 3/12/07, megan cytron [EMAIL PROTECTED] wrote:
Does load data infile query of mysql doesnt work in cftransaction?
I'm curious... did you ever figure this out? I'm also trying to determine
the simplest/most efficient way of loading the data from a .csv file into a
mysql DB using CF
Tom Kitta wrote:
You should only use cftransaction tag to make sequence of SQL statements
into one atomic unit. You should never have anything inside your
cftransaction block that is not SQL related especially if its going to take
a long time (i.e. more than few ms). You don't want to lock
it is
OK (within limits, like say 10ms). We are talking here about tasks that will
take a long time more than say few ms, like 50ms or something like that.
Calling functions from cftransaction tag that execute a query is treated as
SQL, calling a function to do an FTP operation is a definite
cftransaction tag that execute a query is treated
as
SQL, calling a function to do an FTP operation is a definite NO.
There is even a classic example in some of the Adobe CF notes - don't
place
user interaction code in cftransaction tag - I don't even go as far as
such
extremes,
TK
- don't place
user interaction code in cftransaction tag - I don't even go as far as such
extremes,
How would you even do that in CF?
Jochem
~|
Deploy Web Applications Quickly across the enterprise with ColdFusion MX7
Flex 2
Andrew Scott wrote:
Well anyone who puts user interaction between trnsactions should be shot.
But to day that a transaction should only ever run for 10ms, and if it goes
out to 50ms is not a good call either.
I have developed applications that have been very complex in the
calculations,
I think we are into this big 'depends' here conversation - yes if your FTP
is needed in the middle of the processing and it runs once in a while the
transaction is one way to go. However, it would create some issues if it is
to be run like 10 times a second on a server.
As for the DB - I guess
yes if your FTP is needed in the middle of the processing and it runs
once in a while the
transaction is one way to go. However, it would create some issues if it is
to be run like 10 times a second on a server.
However, do not count on the CFTRANSACTION to roll back any file
transfer in case
@houseoffusion.com
Sent: Monday, March 05, 2007 1:49 AM
Subject: Re: cftransaction Question
Andrew Scott wrote:
Well anyone who puts user interaction between trnsactions should be shot.
But to day that a transaction should only ever run for 10ms, and if it
goes
out to 50ms is not a good
Yes I know :) I even used this as a joke with fellow developers at my
company - cftransaction that rolls back *everything*
TK
- Original Message -
From: Claude_Schnéegans [EMAIL PROTECTED]
To: CF-Talk cf-talk@houseoffusion.com
Sent: Monday, March 05, 2007 11:33 AM
Subject: Re
Hi Everyone
I am using cftransaction around few things
1 Reading a file to my local from ftp site
2 query to insert
3 query to loop and do some operations
4 zip files
Now according cftransaction if there is any error in these functionalities, it
should rollback to the initial stage right
You should only use cftransaction tag to make sequence of SQL statements
into one atomic unit. You should never have anything inside your
cftransaction block that is not SQL related especially if its going to take
a long time (i.e. more than few ms). You don't want to lock your SQL server
DBs
Tom,
The statement about, You should only use cftransaction tag to make sequence
of SQL statements into one atomic unit.
Is Correct.
Your Statement about, You should never have anything inside your
cftransaction block that is not SQL related especially if its going to take
a long time (i.e
Scott
Suppose I have 2 queries in cftransaction
1- inserts into database
2 reads from database
Then cftransaction action=commit
is it only after the commit i will be able to see the values in the database?
my 1st insert is load data infile somehow i cant see my results in database
during
Does load data infile query of mysql doesnt work in cftransaction?
~|
Upgrade to Adobe ColdFusion MX7
Experience Flex 2 MX7 integration create powerful cross-platform RIAs
http://www.adobe.com/products/coldfusion/flex2
Scott is not here at the moment, but maybe I can answer the question for
you.
Yes until the final cftransaction you will not see the data in the database,
but having said that.
cftransaction
/cftransaction
In your case the sql query to read doesn't need to be in the cftransaction,
you can place
We're investigating performance issues in a db app that is throwing lock
contention errors. One of the things we are looking into is using the
UPDLOCK optimizer hint (this is for SQL Server 2000). However, we have a
situation where a number of queries are run inside a cftransaction tag.
We
I have a question. I have a application where on one template I have several
inserts into one datasource are wrapped inside a cftransaction. At the end of
the loop, but outside the cftransaction, I have an update of a record in a
second datasource, marking it as viewed. My question, is can I
I have a question. I have a application where on one template
I have several inserts into one datasource are wrapped inside
a cftransaction. At the end of the loop, but outside the
cftransaction, I have an update of a record in a second
datasource, marking it as viewed. My question
.
Of course, I could be thinking of something else, as I said, I didn't
just test this.
-Original Message-
From: Dave Watts [mailto:[EMAIL PROTECTED]
Sent: Wednesday, February 21, 2007 4:14 PM
To: CF-Talk
Subject: RE: cftransaction and two datasources
I have a question. I have
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
hi
i'm still newbie to xml thingy, do u think i can use cftransaction and cftry
into my code below?
cfflush interval=10
!DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.0 Transitional//EN
http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd;
html xmlns=http://www.w3.org/1999/xhtml;
head
meta http
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
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
/cfcatch
/cftry
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
Hi,
I was wondering if anyone had any experience executing cfstoredproc calls
within cftransaction's.
The livedocs for cftransaction focus on cfquery operations. Though, using a MS
Sql Server 2000 database, cftransaction seems to fully support rollback of
cfstoredproc calls.
I know it would
I was wondering if anyone had any experience executing
cfstoredproc calls within cftransaction's.
The livedocs for cftransaction focus on cfquery operations.
Though, using a MS Sql Server 2000 database, cftransaction
seems to fully support rollback of cfstoredproc calls.
I know
Is there any way to carry a True/False value from the result
of queries between cftransaction tags?
Thanks.
D
~|
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:241043
Archives: http://www.houseoffusion.com/cf_lists
Meaning a success/fail value for the transaction as a whole?
The only time CFTRANSACTION will implicitly roll back is when an
exception is raised. So if the CFTRANSACTION block exits normally
(assuming you're not doing a manual rollback), then you know the
transaction was successful. Conversely
Tony wrote:
does that retrieve the newest UUID Primary Key generated?
right now, i have a dateAdded field that i sort by, to get the newest one.
That's not real reliable. What happens if two records are added in the
same second? :)
Yes, it returns the last identity inserted, and inside a
Yep, indeed. They should also not be using @@identity :-)
-Original Message-
From: Rick Root [mailto:[EMAIL PROTECTED]
Sent: 04 April 2006 03:51
To: CF-Talk
Subject: cftransaction
I'm looking through someone elses code and I came across this...
cftransaction
cfquery name
Ruckelshaus [mailto:[EMAIL PROTECTED]
Sent: Monday, April 03, 2006 9:03 PM
You are correct.
Moreover, a better solution would be something like this
(assuming SQL Server):
cftransaction
cfquery name=qInsertData datasource=#APPLICATION.dsn#
INSERT INTO t_doctors
In MS SQL I've seen two ways to handle returning the last inserted primary
key:
INSERT INTO t_doctors (#ColNames#)
VALUES (#preserveSingleQuotes(ColValues)#);
SELECT SCOPE_IDENTITY() AS newpkey;
This will return the last inserted primary key for the current
1 - 100 of 538 matches
Mail list logo