Re: BeginTrans
From: Brian Bushay TeamB (BBushay_at_Nmpls.com)
Date: 01/19/05
- Next message: Hifni: "Temporary Tables"
- Previous message: Brian Bushay TeamB: "Re: Client/Server Architecture vs. MiddleTier"
- In reply to: Dave Blake: "Re: BeginTrans"
- Next in thread: Dave Blake: "Re: BeginTrans"
- Reply: Dave Blake: "Re: BeginTrans"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Tue, 18 Jan 2005 21:03:30 -0600
>Using BatchOptimistic locking each user gets to work locally.
Using serverside cursors has each user working locally. BatchOptimistic extends
that by caching writes to the server until you updateBatch
>I think I then
>need to use a transaction to keep master and detail changes together. If
>there is a problem, and/or the user does not want to overwrite other edits,
>then rollback cleans up both master and details (or does it? Should I
>CancelBatch too?).
The transaction gets cleaned up on the server side but not on the client side.
For example you start a transaction and UpdateBatch on the Master and that
succeed, you then UpdateBatch on the Detail and that fails so you RollBack.
The data on the server should be the same as before you started the transaction
however the data in the Master TadoDataset.UpdateStatus will reflect that all
the records have been posted.
The Detail will reflect that the Records have not been posted.
If you want your clientside datasets to revert back to their state before
UpdateBatch then you need to clone the recordset before starting the UpdateBatch
so you have another copy to revert back to.
> On the other hand if the "error" is because the record
>(master of one of the details) has changed (using update criteria to detect
>this),
Update Criteria isn't going to help you find what error occurred.
You need to first look at the TadoConection.errors collection to see what errors
where generated and then at each record RecordSet.status property
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/his_2004Main/htm/_sna_status_property_oledb.asp
After that you can check each RecordSet field's UnderlyingValue against the
OrigianalValue to find where a field's value was changed after your clientside
cursor got its values.
> the user does not want to loose what they have entered even if they
>leave it on the screen just long enough to check with the boss etc. Not sure
>what state rollback leaves the local data.
>
>I'm sure I am not comming up with anything new here, even if I am not sure
>what I am doing!
-- Brian Bushay (TeamB) Bbushay@NMPLS.com
- Next message: Hifni: "Temporary Tables"
- Previous message: Brian Bushay TeamB: "Re: Client/Server Architecture vs. MiddleTier"
- In reply to: Dave Blake: "Re: BeginTrans"
- Next in thread: Dave Blake: "Re: BeginTrans"
- Reply: Dave Blake: "Re: BeginTrans"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|