Board index » delphi » DATASET POST not working

DATASET POST not working

I'm using D4 on an NT4 Workstation using the Apollo BDE replacement.
Despite using Apollo's COMMIT (which maps to POST) everywhere, data
updates won't physically update to disk until the application is exited
normally.  Abnormal exits result in data loss.  I can't use FLUSHBUFFERS
because Apollo's dataset isn't a descendent of TDBEDataSet.
Furthermore, I can't find any settings to change in NT4, either.
Ideas???
 

Re:DATASET POST not working


Quote
Troy Gilbert <safe...@earthlink.net> wrote:
> I'm using D4 on an NT4 Workstation using the Apollo BDE replacement.
> Despite using Apollo's COMMIT (which maps to POST) everywhere, data
> updates won't physically update to disk until the application is exited
> normally.  Abnormal exits result in data loss.  I can't use FLUSHBUFFERS
> because Apollo's dataset isn't a descendent of TDBEDataSet.
> Furthermore, I can't find any settings to change in NT4, either.
> Ideas???

Troy,
first try to turn of the Apollo's optimistic buffeing (set TApolloDataSet's
property OptimisticBuffer to false). And second, this problem might also
be related to some Apollo anomally (bug) I noticed (it might be fixed on
later versions - I haven't tried 4.5.4 or 4.6) - if you use DataSource's
AutoEdit option (which probbably means that you're relying on it and not
explicitly calling the Edit nor Post methods from the code) and just close
the application/window, no changes will be written to database. The solution
is to use Form's OnClose (or on Destroy) event hadnler, check there if
DataSet is in dsEdit or dsInsert mode and then explicitly call the Post
method. That worked for me, hopefully it will work for you.

--
Jovan Bulajic
Belgrade, Yu
bul...@sezampro.yu

Re:DATASET POST not working


I should have specified the following up front:
1) OptimisticBuffer, SpeedMode and TurboRead are all set to False.
2) All files are opened at application startup and closed at shutdown.
3) All file update sequences are either AppendBlank/Replace/Commit (for new
records) or Edit/Replace/Commit (for existing records).
I don't need AutoEdit set to True, so I'll check that out.  Given my experiences
with properties having odd effects, it's certainly worth a shot.

Thanks!

Troy

Quote
Jovan Bulajic wrote:
> Troy Gilbert <safe...@earthlink.net> wrote:

> > I'm using D4 on an NT4 Workstation using the Apollo BDE replacement.
> > Despite using Apollo's COMMIT (which maps to POST) everywhere, data
> > updates won't physically update to disk until the application is exited
> > normally.  Abnormal exits result in data loss.  I can't use FLUSHBUFFERS
> > because Apollo's dataset isn't a descendent of TDBEDataSet.
> > Furthermore, I can't find any settings to change in NT4, either.
> > Ideas???

> Troy,
> first try to turn of the Apollo's optimistic buffeing (set TApolloDataSet's
> property OptimisticBuffer to false). And second, this problem might also
> be related to some Apollo anomally (bug) I noticed (it might be fixed on
> later versions - I haven't tried 4.5.4 or 4.6) - if you use DataSource's
> AutoEdit option (which probbably means that you're relying on it and not
> explicitly calling the Edit nor Post methods from the code) and just close
> the application/window, no changes will be written to database. The solution
> is to use Form's OnClose (or on Destroy) event hadnler, check there if
> DataSet is in dsEdit or dsInsert mode and then explicitly call the Post
> method. That worked for me, hopefully it will work for you.

> --
> Jovan Bulajic
> Belgrade, Yu
> bul...@sezampro.yu

Re:DATASET POST not working


Could running NTFS vs. FAT have anything to do with it?
Quote
Troy Gilbert wrote:
> I should have specified the following up front:
> 1) OptimisticBuffer, SpeedMode and TurboRead are all set to False.
> 2) All files are opened at application startup and closed at shutdown.
> 3) All file update sequences are either AppendBlank/Replace/Commit (for new
> records) or Edit/Replace/Commit (for existing records).

> I don't need AutoEdit set to True, so I'll check that out.  Given my experiences
> with properties having odd effects, it's certainly worth a shot.

> Thanks!

> Troy

> Jovan Bulajic wrote:

> > Troy Gilbert <safe...@earthlink.net> wrote:

> > > I'm using D4 on an NT4 Workstation using the Apollo BDE replacement.
> > > Despite using Apollo's COMMIT (which maps to POST) everywhere, data
> > > updates won't physically update to disk until the application is exited
> > > normally.  Abnormal exits result in data loss.  I can't use FLUSHBUFFERS
> > > because Apollo's dataset isn't a descendent of TDBEDataSet.
> > > Furthermore, I can't find any settings to change in NT4, either.
> > > Ideas???

> > Troy,
> > first try to turn of the Apollo's optimistic buffeing (set TApolloDataSet's
> > property OptimisticBuffer to false). And second, this problem might also
> > be related to some Apollo anomally (bug) I noticed (it might be fixed on
> > later versions - I haven't tried 4.5.4 or 4.6) - if you use DataSource's
> > AutoEdit option (which probbably means that you're relying on it and not
> > explicitly calling the Edit nor Post methods from the code) and just close
> > the application/window, no changes will be written to database. The solution
> > is to use Form's OnClose (or on Destroy) event hadnler, check there if
> > DataSet is in dsEdit or dsInsert mode and then explicitly call the Post
> > method. That worked for me, hopefully it will work for you.

> > --
> > Jovan Bulajic
> > Belgrade, Yu
> > bul...@sezampro.yu

Other Threads