Re: How to code transactions
- From: <david@epsomdotcomdotau>
- Date: Sat, 11 Aug 2007 21:46:57 +1000
You are correct. If you need transactions, explicit transactions
are the way to go. (In Access 2.x, you could include your
forms inside your explicit transactions, but like many other
fundamental design features, that has been optimised away).
Complex query-based or sub-form based solutions are
really fragile.
If you are starting from scratch, consider using SQL Server.
It's really easy to add after update procedures inside SQL
Server, much easier than the alternatives you are considering.
(david)
"rich" <rich@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:124CCA6B-7B77-4E2E-91E9-26F55892D08F@xxxxxxxxxxxxxxxx
Hellorecord,
I am trying to get an understanding of how Access handles transactions.
In my application, I have a couple table for "tracking" transactions. For
instance, consider you are adding a new employee, updating employee
or terminating an employee. Adding a new employee involves creating theit
initial record. Along with that, I need to track this as a transaction so
can be audited/reported on later.(that
Given that example, how do you perform the insert query to create the
initial employee record (query #1) AND perform an insert to the
tracking/auditing table (query #2) so they are treated as 1 transaction
is if either fails, they are both rolled back)?advise
I think in this situation, I should be using ADO and coding the actual SQL
statements myself, rather than relying on this via the forms. Please
if this is the correct line of thought, especially since little or nothingon
the employee forms would go to the auditing/tracking table.
Hopefully, I provided sufficient details for you. Please let me know if
more details are needed. Any references to sample code or documentation
would be greatly appreciated.
TIA,
Rich
.
- Prev by Date: RE: how to select customers from a table
- Next by Date: Re: Selecting one of duplicate records with a maximum value.
- Previous by thread: Re: Query for records
- Next by thread: Re: How to code transactions
- Index(es):
Relevant Pages
|