Home > Archive > Programming with dBASE > December 2005 > How many Fields has a Table









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author How many Fields has a Table
Francisco Pardo

2005-12-01, 3:23 am

Hi Folks

How do I find how many Fields has my Table? (In a Programm)

Is there a function to do that?

I do not find anything.
Thanks in advance.


Ivar B. Jessen

2005-12-01, 3:23 am

On Thu, 1 Dec 2005 09:18:41 +0100, "Francisco Pardo"
<francisco.pardo@freesurf.ch> wrote:

>Hi Folks
>
>How do I find how many Fields has my Table? (In a Programm)
>
>Is there a function to do that?
>
>I do not find anything.
>Thanks in advance.


Save code below my signature to a prg file and run.


Ivar B. Jessen

//-----
t = new tabledef()
t.tablename = _dbwinhome + "samples\fish.dbf"
t.load()
? "Number of fields in table " + t.tablename + " is " + t.fields.size
//-----
Bruce Beacham

2005-12-01, 3:23 am

Francisco Pardo wrote:

> How do I find how many Fields has my Table? (In a Programm)


use (_dbwinhome + "samples\fish")
? fcount()
use

OR

q = new query([select * from '] + _dbwinhome + "samples\fish" + ['])
? q.rowset.fields.size



Bruce Beacham
Francisco Pardo

2005-12-01, 7:23 am

Thanks a lot.
Regards
Francisco


Francisco Pardo

2005-12-01, 7:23 am

Thanks a lot
Regards
Francisco


Francisco Pardo

2005-12-01, 7:23 am

Thank you and Regards
Francisco


Sponsored Links





Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive | Programming forum archive

Copyright 2008 droptable.com