Dynamically add/remove fields from data dictionary...
Hi,
Our application will be allowing users to add/remove fields to a table in
our database. Of course, we now need to allow that field to be selected
from the RB data dictionary and added to reports.
Question #1: I can see where I can use AppendFieldRecord to add a new field
to the data dictionary, but is there a method to handle deleting of a field
record from the data dictionary? If not, what would be the best way to do
this? Can I simply do a FindKey on the record(s) I want in rbFields and
then delete them, or is there more to it (assume there are no joins involved
on these fields)? I don't want to compromise the integrity of the
dictionary.
FYI: We are using RB 6.01 in Delphi 5.0 with Paradox tables.
Thanks,
--
Vinnie Murdico
Software with Brains, Inc.
http://www.softwarewithbrains.com
Our application will be allowing users to add/remove fields to a table in
our database. Of course, we now need to allow that field to be selected
from the RB data dictionary and added to reports.
Question #1: I can see where I can use AppendFieldRecord to add a new field
to the data dictionary, but is there a method to handle deleting of a field
record from the data dictionary? If not, what would be the best way to do
this? Can I simply do a FindKey on the record(s) I want in rbFields and
then delete them, or is there more to it (assume there are no joins involved
on these fields)? I don't want to compromise the integrity of the
dictionary.
FYI: We are using RB 6.01 in Delphi 5.0 with Paradox tables.
Thanks,
--
Vinnie Murdico
Software with Brains, Inc.
http://www.softwarewithbrains.com
This discussion has been closed.
Comments
Joins. Then update the metacache in Dade by adding daMetaData to your uses
clause and then call gMetaData.Clear (global singleton object) which clears
the cached info from Dade, so that the newly deleted table/field/join
doesn't show up in the Dade query tools.
Cheers,
Jim Bennett
Digital Metaphors
http://www.digital-metaphors.com
info@digital-metaphors.com