General information
Category:
Coding, syntax & commands
Bonsoir ,
Il existe en Fox une fonction qui retourne le nombre de champs d'une table ( MonAlias ) tout en recopiant la structure dans une variable tableau (MonTableau).
LeNombreDeChamps = AFIELDS(MonTableau,MonAlias)
Marcel
>J’ai un listbox et je veux afficher le nom des champs d’une table
>Exemple : name,address, city,zip4, country
>
>Voici un bout de code :
>
>lparameter toForm
>
>thisform.oform=toForm
>
>for x=1 to 19
> thisform.lstbox1.additem(thisform.oform.allfield(x,1))
>endfor
>
>
>Mon problème est qu’il me donne le message d’erreur suivant ARRAY DIMENSION ARE INVALID quand le nombre de champs de la table est inférieur à 19
>
>Je crois savoir qu’il faut que je change : FOR X=1 TO 19 par FOR X=1 TO
>« VARIABLES TOTALS DE CHAMPS DANS LA TABLE»
>
>Mais comment aller chercher le nombre total de champ dans une table ?
>
>Merci
>Isabelle
Previous
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only