Board index » delphi » Bug with BDE / Cached Updates

Bug with BDE / Cached Updates

Hi,

After using Cached Updates for some time, I noticed a strange bug:
updates applied through a UpdateSQL component are not immediately sent
to the server.

I am using Oracle 8 and a simple test showed me this fact: after
entering data in a form and saving it, the user who issued the
modifications can see the data, but other users on the network cannot.
After terminating the application, other users can see the altered
data. I suppose the cached is cleared at that moment.

Is there any work around? Something like a BDE API or a method that
flushes the data immediately to the server?

Thanks in advance,

Victor

 

Re:Bug with BDE / Cached Updates


You have to apply and commit the cached changes to the database with
ApplyUpdates and CommitUpdates.
Use the following AfterPost and AfterDelete handlers:

procedure TForm1.Query1AfterPost(DataSet: TDataSet);
begin
  with DataSet as TBDEDataSet do
  try
    ApplyUpdates;
    CommitUpdates;
  except
    CancelUpdates;
    raise;
  end;
end;

procedure TForm1.Query1AfterDelete(DataSet: TDataSet);
begin
  with DataSet as TBDEDataSet do
  try
    ApplyUpdates;
    CommitUpdates;
  except
    CancelUpdates;
    raise;
  end;
end;

"Victor Kaminsky" <pleasenos...@nospam.com> schreef in bericht
news:39c83071.1285959@news.newsguy.com...

Quote
> Hi,

> After using Cached Updates for some time, I noticed a strange bug:
> updates applied through a UpdateSQL component are not immediately sent
> to the server.

> I am using Oracle 8 and a simple test showed me this fact: after
> entering data in a form and saving it, the user who issued the
> modifications can see the data, but other users on the network cannot.
> After terminating the application, other users can see the altered
> data. I suppose the cached is cleared at that moment.

> Is there any work around? Something like a BDE API or a method that
> flushes the data immediately to the server?

> Thanks in advance,

> Victor

Re:Bug with BDE / Cached Updates


Hi

I dont know if it will help you out, but have you updated to BDE v. 5.11 ?

Best regards

Soren, Denmark

Quote
"Victor Kaminsky" <pleasenos...@nospam.com> wrote in message

news:39c83071.1285959@news.newsguy.com...
Quote
> Hi,

> After using Cached Updates for some time, I noticed a strange bug:
> updates applied through a UpdateSQL component are not immediately sent
> to the server.

> I am using Oracle 8 and a simple test showed me this fact: after
> entering data in a form and saving it, the user who issued the
> modifications can see the data, but other users on the network cannot.
> After terminating the application, other users can see the altered
> data. I suppose the cached is cleared at that moment.

> Is there any work around? Something like a BDE API or a method that
> flushes the data immediately to the server?

> Thanks in advance,

> Victor

Other Threads