saving a record in a thread doing funnies - need help
here's what i intend to do, bring up a form in which user fills in the
details of a new record,
and when the user saves the record it saves the record in a
thread,closes the form and brings the user back to the main form. [ the
record has to be saved in a thread, as otherwise the saving is very
slow, its a dbase table]
herewhat i have. When the form is opened the table is put in insert
mode.
i've created a thread and its execute section consists of
datamodule1.fittings.post;
the code behind the save button whic calls the thread is as follows :-
datamodule1.fittings.Fields[6].asdatetime:=strtodate(maskedit1.text);
mysavefit.resume;
mysavefit.terminate;
This works fine,but when i have the table set to cached updates and then
try to save the changes as so
datamodule1.fittings.post;
datamodule1.fittings.applyupdates;
datamodule1.fittings.commitupdates;
it gives a edatabaseenginerror sayiny that the Data structure is corrupt
What gives. For the moment i'll have to leave it witout cached updates
but if anyone has any ideas about
what is going on here i'd like to hear them