Re: Field captions from MS Access




MS Access offers the possibility to specify a caption for each field in the
field definition. I'm writing a Delphi program that accesses an MS Access
database through ADO. I'd like to assing the captions as definied in the
database to the DisplayLabel property of the TField components in Delphi. Is
there a way to do it? I Already tried Fields.Properties (from ADO) and
OpenSchema, but that doesn't give me the information. Any clues?
If you import the ADOX type library you can get at the description with code
like this
Use ADOX:

var
Column: _Column;
fCatalog : Catalog;
begin

fCatalog := CoCatalog.Create;
fCatalog._Set_ActiveConnection(ADOConnection.ConnectionString);
Column := fCatalog.Tables['tablename'].Columns['columnname'];
strColProp := Column.Properties['Description'].Value;

--
Brian Bushay (TeamB)
Bbushay@xxxxxxxxx
.



Relevant Pages

  • Field captions from MS Access
    ... MS Access offers the possibility to specify a caption for each field in the ... field definition. ... I'm writing a Delphi program that accesses an MS Access ... database to the DisplayLabel property of the TField components in Delphi. ...
    (borland.public.delphi.database.ado)
  • Re: Is ADO Dead (3)?
    ... The Design of ADO ... ADO uses a single object, the Recordset, as a common representation for ... a forward-only stream of results from a database, ... where data is updated at the data source or cached locally as with the ...
    (comp.databases.ms-access)
  • Re: Is ADO Dead (3)?
    ... The Design of ADO ... ADO uses a single object, the Recordset, as a common representation for ... a forward-only stream of results from a database, ... where data is updated at the data source or cached locally as with the ...
    (comp.databases.ms-access)
  • Re: Is ADO Dead (3)?
    ... The Design of ADO ... ADO uses a single object, the Recordset, as a common representation for ... a forward-only stream of results from a database, ... where data is updated at the data source or cached locally as with the ...
    (comp.databases.ms-access)
  • Re: Is ADO Dead (3)?
    ... The Design of ADO ... ADO uses a single object, the Recordset, as a common representation for ... a forward-only stream of results from a database, ... where data is updated at the data source or cached locally as with the ...
    (comp.databases.ms-access)