I use virtualtable to manage some data and save them to a file. Saving/loading file works ok except in one case.
If i delete a field from the table and then save it, when i load it again sows the deleted field (in a DBgrid) without the values.
But i don't want the deleted field at all!
Here is a code snipet i use
// table.Fields[j].free;
table.Fields[j].DisposeOf;
.....
table.SaveToFile(filename);
What's wrong, please ?
TvirtualTable260 savetofile question
Re: TvirtualTable260 savetofile question
We've tested this behavior using the following code snippet and received the correct results.
Please try replicating it in your environment.
Code: Select all
...
var Field: TField;
...
Field := VirtualTable.Fields[j];
if Field <> nil then
VirtualTable.DeleteField(Field.FieldName);
VirtualTable.SaveToFile(filename);
...