> Access doesn't have any good way to prevent the multiple 
> simultaneous insert problem. So, by using CFCatch, and 
> CFTransaction you can catch the error of the second insert, 
> rollback the changes and try again with a new value.
> CFTransaction seems to suggest that your set of queries 
> will all run sequentially and then allow others to access 
> the instance. But, in truth, I don't think the tables are 
> locked.

In Access, whenever a record within a table is modified, the entire table is
exclusively locked. So, with CFTRANSACTION around both the query that
modifies a record, and the query that retrieves the autonumber value, no one
else will be able to access the table and insert another record until the
transaction has completed.

With other platforms, however, such as SQL Server, the entire table won't be
locked.

Note that there's no need to use CFTRY/CFCATCH in the above example, unless
your intent is to check a unique index or something along those lines.

Dave Watts, CTO, Fig Leaf Software
http://www.figleaf.com/
voice: (202) 797-5496
fax: (202) 797-5444
______________________________________________________________________
Get Your Own Dedicated Windows 2000 Server
  PIII 800 / 256 MB RAM / 40 GB HD / 20 GB MO/XFER
  Instant Activation · $99/Month · Free Setup
  http://www.pennyhost.com/redirect.cfm?adcode=coldfusionb
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to