Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
SQL question.
Message
De
14/06/2001 07:50:07
 
 
À
14/06/2001 06:08:59
Jimi Lee
Pop Electronic Products Ltd.
Hong Kong, Hong Kong
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Titre:
Divers
Thread ID:
00519213
Message ID:
00519223
Vues:
18
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
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform