Subject | Re: [IBO] Insert and Post |
---|---|
Author | Geoff Worboys |
Post date | 2001-02-20T10:34:57Z |
> Doesn't look like double Insert.were
> I noticed that BeforePost() is called after AfterInsert(). If there
> double Insert()'s, then shouldn't the Post occure before Insert?.I dont understand "BeforePost() is called after AfterInsert()"?
BeforePost is called from within SysPost, but ONLY if you get inside
the "NeedToPost" check. .GetNeedToPost looks like...
Result := State in [ dssEdit, dssInsert, dssDelete ];
So the only way BeforePost should be called when you do an insert is
if the dataset was previously in Edit/Insert/Delete state.
> Maybe it's something to do with my query. It looks like:I dont think so, I think it must be something on your form.
Somehow the previous record is somehow getting thrown into an
edit/insert state causing IBO to try and post the that record while
preparing to insert. Put a breakpoint in the top of SysInsert,
SysEdit and SysDelete and see if these are being hit unexpectedly.
I guess I could be wrong, but at the moment I dont see how else
BeforePost could be getting called.
HTH
Geoff Worboys
Telesis Computing