What is the best way to identify all Data-aware controls which are 'bound'
to a particular Datasource. i.e. have their Datasource property set to a
specific datasource object?
At present I loop through all the form's components looking for DBEdits,
DBCombos etc and check their datasource property (requires typecasting etc)
but I feel that the datasource must know internally what controls it is
maintaining!!
Thanks
David
It does, but the link is indirect. TDatasource has a protected property that
gives access to its internal list of TDatalink references. You could walk
over this list, check if the datalink you have is a TFieldDatalink and if it
is use the links COntrol property to get at the control the link belongs to.
See source in db.pas, dbctls.pas.
Peter Below (TeamB) 10011...@compuserve.com)
No e-mail responses, please, unless explicitly requested!