Re: UpdateBatch or Post changes state to dsBrowse
- From: "mibi222" <mibi222@xxxxxxxxxxx>
- Date: 21 Oct 2005 00:17:25 -0700
I think I finally got it working.. except for one major
problem regarding Master-Detail keys. Yes, I know there are
too many posts on this but I haven't found one with a clear
solution, so please bear with me and try not to mind my
ignorance..!
I'm using a detail datasource that is linked to the master
datasource through DataSource/MasterFields and works perfectly
when browsing and editing. The problem only occurs during
INSERTs. As far as I know, the Detail key will only be linked
to the Master Key after the master's UpdateBatch. (It seems
even master table's POST command won't work).
But, I want to be able to insert detail records and
UpdateBatch everything after the user clicks the apply button.
Manually setting the master's ID value and issuing POST won't
work either, until UpdateBatch. Isn't it the whole purpose of
using BatchOptimistic to be able to do local POSTS and
Update everything at once later? So how am i supposed to deal
with Master-Detail inserts in this scenario??
Please help!! This has always been a major source of confusion
and I'd greatly appreciate your suggestions.
Thanks!
Brian Bushay TeamB <BBushay@xxxxxxxxx> wrote:
>
>>The problem here is that no error is generated on
>>datasetMaster's post even with unallowed null fields..!? and
>>state is also changed to dsBrowse.. I have NO IDEA why this
>>occurs..?
>The error messages you are generated by the database which are returned from the
>UpdateBatch. The Post just saves the changes to your cached records.
>
>>
>>Contrary to your suggestion, I would like the DATABASE to
>>return errors instead of having to code every single
>>validation possible for all errors that may occur during
>>OnPost (and in case of error, CONTINUE in dsInsert state)..
>Then you should not be using BatchUpdate.
>If you are not using batchupdates you will get the database errors returned on
>Post and if the post fails you will remain in Edit/Insert
>
>>I thought the most logical thing to occur when UpdateBatch
>>returns a database error is to cancel all operations and leave
>>you in the current state of dsInsert (or dsEdit)..
>>This is basic operation and there must be a simple solution
>>to this!! I'm defintely missing something here. Please help me
>>find a solution to this!
>No simple solution here.
>If you use batchUpdate you will have to take care of the error handling in code.
>
>
>>
>>(By the way, I'm getting many EOLEException errors when
>>running in IDE, but from what I read, this is normal with
>>ADO..)
>Not enough information here.
>--
>Brian Bushay (TeamB)
>Bbushay@xxxxxxxxx
.
- Follow-Ups:
- Re: UpdateBatch or Post changes state to dsBrowse
- From: Brian Bushay TeamB
- Re: UpdateBatch or Post changes state to dsBrowse
- References:
- UpdateBatch or Post changes state to dsBrowse
- From: mibi222
- Re: UpdateBatch or Post changes state to dsBrowse
- From: Brian Bushay TeamB
- Re: UpdateBatch or Post changes state to dsBrowse
- From: mibi222
- Re: UpdateBatch or Post changes state to dsBrowse
- From: Brian Bushay TeamB
- UpdateBatch or Post changes state to dsBrowse
- Prev by Date: changing a Clinet/Server application to use connection pooling
- Next by Date: Invalid Variant Type
- Previous by thread: Re: UpdateBatch or Post changes state to dsBrowse
- Next by thread: Re: UpdateBatch or Post changes state to dsBrowse
- Index(es):