Subject | Re: "Failed to post all datasets" - new observations |
---|---|
Author | Jason Wharton |
Post date | 2008-07-15T16:51:48Z |
--- In IBObjects@yahoogroups.com, Aage Johansen <aagjohan@...> wrote:
putting a dataset back into a state that needs to be posted during
the sequence of events when Commit or CommitRetaining is called.
I suggest you get a look at the callstack and see if you can figure
out which dataset has gone back into an edit state and then set a
breakpoint for that dataset that will stop when it is going back
into that state and look at the callstack there. This will give you
the smoking gun.
Jason
>project)
>
> In April, I posted this:
> -------------------------------------
> Delphi/2007
> IBO/4.8.7
> Firebird 1.5.4
>
> I've recently encountered (for the first time, and in an old
> the exception E_Failed_To_Post_Datasets: "Failed to post alldatasets".
> It is raised in IB_Components: TIB_Transaction.SysPostAll - atleast,
> that's the only place I found it referenced in the IBO source.rows
> I'd like to hear any hints about something to check...
>
> It happens when I delete a record from a grid (actually, two grids
> behave like this). It seems to happen only when there are other
> present in the grid - deleting the last rows in a grid works ok.The
> tables feeding the grids (through TIB_Queries) hold >1mill andgo
>3mill
> rows, but the selections in the grids are usually just a few rows.
> The TIB_Queries use the same transaction.
> The deletes are initiated through clicking the delete button on a
> TIB_Updatebar.
> Anyway, after clicking the button on the error dialog, the deletes
> through sucessfully.the
> -------------------------------------
>
> No one responded, but recently I got this comment:
> -------------------------------------
> A little late, but..
> From memory, this happens when you have more than one dataset in
> same transaction. For commit to work, they all have to be in theproblem?
> same state ie all of them in browse.
> -------------------------------------
>
> I thought this strange, and answered:
> -------------------------------------
> Could this - datasets being in different _states_ - really be a
> -------------------------------------transactions.
>
> And the response was:
> -------------------------------------
> Yes, that's where I have seen it. It was in master/detail linked
> datasets where one was posted and was not (I think) OR one was in
> browse mode and the other in edit.
> I got sick of these errors and have coded the stuff with separate
> -------------------------------------This error is likely caused because you have event code that is
>
>
> Now, I would like to have this confirmed (or not) - if
> possible. Further comments are also welcome!
>
>
> TiA
> Aage J.
>
putting a dataset back into a state that needs to be posted during
the sequence of events when Commit or CommitRetaining is called.
I suggest you get a look at the callstack and see if you can figure
out which dataset has gone back into an edit state and then set a
breakpoint for that dataset that will stop when it is going back
into that state and look at the callstack there. This will give you
the smoking gun.
Jason