Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
SQL question.
Message
From
14/06/2001 07:50:07
 
 
To
14/06/2001 06:08:59
Jimi Lee
Pop Electronic Products Ltd.
Hong Kong, Hong Kong
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Title:
Miscellaneous
Thread ID:
00519213
Message ID:
00519223
Views:
17
This message has been marked as the solution to the initial question of the thread.
Once you get your cursor open via SQLEXEC just do something like..
select mycusor
nFcount=AFIELDS(afld)

nFcount has the number of columns...
This works for SQLEXEC'd cursors (if you select * from table)
and for VFP tables.

On oracle you can do

SQL> select count(*) from dba_tab_columns where owner='FDB' and table_name='STYLES';

COUNT(*)
----------
196


SQL Server has a similar table but I don't know it's name...

Or use SQLCOLUMNS..

In ado I use..
ors=open(...)
nFcount=oRs.fields.count

HTH
Previous
Reply
Map
View

Click here to load this message in the networking platform