Subject | How to hide transactions to the user. I'm confused |
---|---|
Author | Marco Menardi |
Post date | 2001-11-14T23:50:58Z |
I'm developing a sort of accounting app. For base tables (customers,
etc.) I'm using a single transaction component for all the queries
with AutoCommit set to true.
That works fine for single table work, but when I work on a
master-detail relation (without referential integrity, and let me
without it for this discussion) the user can insert the master record,
fill some fields, insert the detail, fill some fields, post the
detail, cancel the master!
I don't want the user to deal with the transaction bar, since it's a
too advanced topic for such a simple data entry situation.
So I think I need something like:
If inserting to master, start transaction
If posting on master, commit transaction
If cancelling on master, rollback transaction
So I can work with the base transaction inside the BeforeInsert,
AfterPost and AfterCancel qryMain events.
Is it good this way? How do you do this kind of job?
Second: if while inserting a master record I call a window for editing
another table, since both are chained to the same transaction
component, will be initiated one more transaction, or the two edits
are inside the same? I ask this because with SQL monitor I usually see
a lot of different transaction numbers carrying on when I insert
master+detail, so I'm missing the relation between the transaction
component and started transactions...
Thanks
Marco Menardi
etc.) I'm using a single transaction component for all the queries
with AutoCommit set to true.
That works fine for single table work, but when I work on a
master-detail relation (without referential integrity, and let me
without it for this discussion) the user can insert the master record,
fill some fields, insert the detail, fill some fields, post the
detail, cancel the master!
I don't want the user to deal with the transaction bar, since it's a
too advanced topic for such a simple data entry situation.
So I think I need something like:
If inserting to master, start transaction
If posting on master, commit transaction
If cancelling on master, rollback transaction
So I can work with the base transaction inside the BeforeInsert,
AfterPost and AfterCancel qryMain events.
Is it good this way? How do you do this kind of job?
Second: if while inserting a master record I call a window for editing
another table, since both are chained to the same transaction
component, will be initiated one more transaction, or the two edits
are inside the same? I ask this because with SQL monitor I usually see
a lot of different transaction numbers carrying on when I insert
master+detail, so I'm missing the relation between the transaction
component and started transactions...
Thanks
Marco Menardi