Posted on 2001-08-12
I can get the programm to work using a long case Table1.FieldDefs[i].DataType of
ftstring : begin
fieldDef[I].FieldType : 'String';
ftInteger : begin ....etc its long...
So how can i use a function using enumerated type to make it shorter? I'm having problem with the DataType with Tfield aand string. Its from a database which the user will select from a combo box and I want to show the datatype of the database.
I used this and the Error is in the GetDataType....
for i:=0 to Table1.FieldDefs.Count-1 do
CombFieldName.Add(Table1.FieldDefs[i].Name + '('+
GetDataType(Table2.FieldDef[i].DataType) + '-' +
IntToStr(Table1.FieldDefs[i].Size + ')');
any ideas of how to go abt. I tried using the DB unit but still can't solve it.