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 use MySQL/MyISAM. That you can rely on it in this instance 
to give you back the right ID should not be seen as an indication that 
MyISAM is suitable for any purpose at all, let alone the reliable 
storage of your data.


> 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 
> single-threaded and is therefore not recommended for normal database access."

The effects of a serializable transaction are defined in terms of 
operations that can not happen. Any side-effects, such as the locking of 
tables, are implementation defined. I believe the CF manual should not 
make claims about things that are outside the control of CF and I will 
file a bug against the documentation this weekend.


> So would you still say that SERIALIZABLE is the way to go?

It is not required for your application. And if you want to really use 
transactions you need at the very least a new table handler (InnoDB) and 
perhaps even a new database first. And if your new table handler / 
database uses some form of multiversioning it is quite likely that a 
serializable transaction does not exclusively lock tables.


> I've been trying to encourage the guys to upgrade to SQLsever this will be a 
> good argument!!!

I would be very careful making that argument. If you happen to run into 
somebody who understands the transaction locking models of MySQL/InnoDB 
and MS SQL Server she will turn that argument around on you.

Jochem

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Upgrade to Adobe ColdFusion MX7
Experience Flex 2 & MX7 integration & create powerful cross-platform RIAs
http://www.adobe.com/products/coldfusion/flex2/?sdid=RVJQ 

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:274175
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

Reply via email to