i7mad
asked on
TTable AfterPost Event, BDE, Delphi 2009
Hello,
I still use the BDE over Delphi 2009, Paradox Tables.
if a database or a table is local on a PC installed (Paradox or Dbase) and the BDE-setting
"LOCAL SHARE" is FALSE, then changings are not stored immediatly but are kept in the memory.
This changings are gone after a crash.
So I got an idea from a website, it says that I should write the below code to force BDE to Store changes to the table.
in my application which have more than 100 forms, and more than 70 tables, If I want to do this for all Tables It will take time coding.
My Question is: is there any windows Message I can trap, so I can tell the Application to run the below code when OnPost event happens for all tables in my application.
I still use the BDE over Delphi 2009, Paradox Tables.
if a database or a table is local on a PC installed (Paradox or Dbase) and the BDE-setting
"LOCAL SHARE" is FALSE, then changings are not stored immediatly but are kept in the memory.
This changings are gone after a crash.
So I got an idea from a website, it says that I should write the below code to force BDE to Store changes to the table.
in my application which have more than 100 forms, and more than 70 tables, If I want to do this for all Tables It will take time coding.
My Question is: is there any windows Message I can trap, so I can tell the Application to run the below code when OnPost event happens for all tables in my application.
procedure TForm1.Table1AfterPost(DataSet:TDataSet);
begin
DbiSaveChanges(Table1.Handle);
end;
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thanks.
i7mad,
i would call it in the OnClose of the mainform
this way the applications hasn't freed all the objects yet
in the ondestroy it's possible some objects/tables got destroyed/freed allready.
G
i would call it in the OnClose of the mainform
this way the applications hasn't freed all the objects yet
in the ondestroy it's possible some objects/tables got destroyed/freed allready.
G
ASKER
Thanks.
ASKER
So I should call this procedure before Application.Terminate, or I think on Main form Destroy event?