Solved

functions...

Posted on 2001-08-12
1
175 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
Comment Utility
Why not just use Fields[i].Name, Fields[i].DataType, Fields[i].Size instead of FieldDefs. :>)


The Crazy One
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Suggested Solutions

This article explains how to create forms/units independent of other forms/units object names in a delphi project. Have you ever created a form for user input in a Delphi project and then had the need to have that same form in a other Delphi proj…
In my programming career I have only very rarely run into situations where operator overloading would be of any use in my work.  Normally those situations involved math with either overly large numbers (hundreds of thousands of digits or accuracy re…
In this tutorial you'll learn about bandwidth monitoring with flows and packet sniffing with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're interested in additional methods for monitoring bandwidt…
You have products, that come in variants and want to set different prices for them? Watch this micro tutorial that describes how to configure prices for Magento super attributes. Assigning simple products to configurable: We assigned simple products…

763 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

13 Experts available now in Live!

Get 1:1 Help Now