Welcome To The Home Of The Visual FoxPro Experts  
home. signup. forum. archives. search. google. articles. downloads. faq. members. weblogs. file info. rss.
 From: Boudewijn Lutgerink
  Where is Boudewijn Lutgerink?
 Hoonaardstraat, Driel
 Netherlands
 Boudewijn Lutgerink
 To: Dan-Yeung
  Where is Dan-Yeung?
 San Diego
 California - United States
 Dan-Yeung
 Tags
Subject: RE: A command that find a column in a table
Thread ID: 80026 Message ID: 80050 # Views: 35 # Ratings: 1
Version: Visual FoxPro 6 Category: General VFP Topics
Date: Tuesday, October 25, 2005 6:24:29 AM         
   


> > > What is the command that will find a column name in a table and returns true or false?
> > >
> > > Thanks.
> > > Dan-Yeung

> >
> > Is FIELD() what you're looking for?
> >
> > -BP
> > www.peisch.com

>
> I used ?field(id) at the Command Window and got "Function argument value, type, or count is invalid".
>
> Thanks.
> Dan-Yeung


field() is one typical example of an override function. It can take two parameters. One is numeric the other is a string.

If you give it a numeric value it will return the name of the field, given that the number does not exceed the amount of fields in your table. In that case it will return nothing. fcount() will give you the number of fields in a table.

If you give it a string then that string must be a name of a field in your table. It will then return the name of that same field, given again that the name exists in your table. Otherwise it will return nothing.

Boudewijn LutgeĀ®ink
My Blog is here


COMPLETE THREAD

A command that find a column in a table Posted by Dan-Yeung @ 10/25/2005 2:00:02 AM
RE: A command that find a column in a table Posted by Barbara Peisch @ 10/25/2005 2:02:51 AM
RE: A command that find a column in a table Posted by Dan-Yeung @ 10/25/2005 5:20:46 AM
RE: A command that find a column in a table Posted by Boudewijn Lutgerink @ 10/25/2005 6:10:47 AM
RE: A command that find a column in a table Posted by Boudewijn Lutgerink @ 10/25/2005 6:24:29 AM
RE: A command that find a column in a table Posted by Jim Winter @ 10/25/2005 12:10:42 PM
RE: A command that find a column in a table Posted by adfil sotto @ 10/25/2005 2:54:32 AM
RE: A command that find a column in a table Posted by Marcia Akins @ 10/25/2005 12:53:30 PM