Link to home
Start Free TrialLog in
Avatar of Venne
Venne

asked on

How to get table's structure info?

Hi, expert:

I know there is a way that can be  get table's  stucture info within
program. I look for online help , I couldn't find out it .
PLS, Give me a hint. thanks.

Venne

Avatar of JoeBooth
JoeBooth

The simplest way is to loop through the fields property associated with the table.

for x := 0 to theTable.fields.count-1 do
begin
   //
   // Get the field
   theField := theTable.fields[x];
   // Only look at fields from table
   if theField.fieldKind = fkData
   then
     begin
        // Some field properties
        // of interest
   fieldname - name of field from table
   datatype - type of data
   datasize - size of data

     end;
end;
ASKER CERTIFIED SOLUTION
Avatar of PeterLarsen
PeterLarsen

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
You may find the information in the helpfile : "Borland Database Engine online Reference".
Search for "CURProps"

/PL
Avatar of Venne

ASKER

Though, your anwser is not I wanted, but it help me find out what I wanted. so I will give you points.
Thanks.