Solved

functions...

Posted on 2001-08-12
1
176 Views
Last Modified: 2010-04-06
Hello,

I can get the programm to work using a long case Table1.FieldDefs[i].DataType of
ftstring : begin
fieldDef[I].FieldType : 'String';
end;
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
begin
CombFieldName.Add(Table1.FieldDefs[i].Name + '('+
GetDataType(Table2.FieldDef[i].DataType) + '-' +
IntToStr(Table1.FieldDefs[i].Size + ')');
end;

any ideas of how to go abt. I tried using the DB unit but still can't solve it.
0
Comment
Question by:rhapsody7
1 Comment
 
LVL 44

Accepted Solution

by:
CrazyOne earned 10 total points
ID: 6378396
Why not just use Fields[i].Name, Fields[i].DataType, Fields[i].Size instead of FieldDefs. :>)


The Crazy One
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

In this tutorial I will show you how to use the Windows Speech API in Delphi. I will only cover basic functions such as text to speech and controlling the speed of the speech. SAPI Installation First you need to install the SAPI type library, th…
Creating an auto free TStringList The TStringList is a basic and frequently used object in Delphi. On many occasions, you may want to create a temporary list, process some items in the list and be done with the list. In such cases, you have to…
With the power of JIRA, there's an unlimited number of ways you can customize it, use it and benefit from it. With that in mind, there's bound to be things that I wasn't able to cover in this course. With this summary we'll look at some places to go…
Learn how to create flexible layouts using relative units in CSS.  New relative units added in CSS3 include vw(viewports width), vh(viewports height), vmin(minimum of viewports height and width), and vmax (maximum of viewports height and width).

920 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now