Re: MS Access table and field properties
- From: "TMA" <tmasoftwares@xxxxxxxxx>
- Date: Sun, 28 Aug 2005 15:06:18 -0300
Thanks Alfred,
But how about the comments I put in MS Access for each field? Is there a way
to retrieve it?
"Alfred ten Hoeve" <Alfred@xxxxxxxxx> wrote in message
news:43110fc9@xxxxxxxxxxxxxxxxxxxxxxxxx
> "TMA" <tmasoftwares@xxxxxxxxx> schreef in bericht
> news:4310ac19@xxxxxxxxxxxxxxxxxxxxxxxxx
>> I'm using D7 and would like to retrieve some field properties using ADO
>> from a MS Access database. I need to know for each given table name the
>> list with field names, and in each field, it's type (number, string,
>> etc), it's maximum size and the comments i write on MS Access main
>> program.
>> Help with some source code would be appreciated.
>> Thanks in advance.
>
> Something like this:
>
> procedure TForm1.GetIt;
> var
> i : integer;
> s : string;
> l : integer;
> begin
> ADODataSet1.GetFieldNames(ListBox1.Items);
> for i := 0 to ADODataSet1.FieldCount - 1 do
> begin
> case ADODataSet1.Fields[i].DataType of
> ftUnknown : s := 'Unknown';
> ftString : s := 'String';
> ftSmallint : s := 'SmallInt';
> ftInteger : s := 'Integer';
> ftFixedChar : s := 'FixedChar';
> ftWideString : s := 'WideString';
> // etc
> end;
> ListBox2.Items.Add(s);
> l := ADODataSet1.Fields[i].Size;
> ListBox3.Items.Add(IntToStr(l));
> end;
> end;
>
> Alfred.
>
.
- Follow-Ups:
- Re: MS Access table and field properties
- From: Brian Bushay TeamB
- Re: MS Access table and field properties
- References:
- MS Access table and field properties
- From: TMA
- Re: MS Access table and field properties
- From: Alfred ten Hoeve
- MS Access table and field properties
- Prev by Date: Re: TADOconnection not found
- Next by Date: Re: TADOconnection not found
- Previous by thread: Re: MS Access table and field properties
- Next by thread: Re: MS Access table and field properties
- Index(es):
Relevant Pages
|