Solved

functions...

Posted on 2001-08-12
1
180 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

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

Objective: - This article will help user in how to convert their numeric value become words. How to use 1. You can copy this code in your Unit as function 2. than you can perform your function by type this code The Code   (CODE) The Im…
Hello everybody This Article will show you how to validate number with TEdit control, What's the TEdit control? TEdit is a standard Windows edit control on a form, it allows to user to write, read and copy/paste single line of text. Usua…
There are cases when e.g. an IT administrator wants to have full access and view into selected mailboxes on Exchange server, directly from his own email account in Outlook or Outlook Web Access. This proves useful when for example administrator want…
In this video, viewers are given an introduction to using the Windows 10 Snipping Tool, how to quickly locate it when it's needed and also how make it always available with a single click of a mouse button, by pinning it to the Desktop Task Bar. Int…
Suggested Courses
Course of the Month9 days, 11 hours left to enroll

623 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