Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Arrays & SQL
Message
 
À
14/08/1996 09:12:11
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Divers
Thread ID:
00005634
Message ID:
00005701
Vues:
31
>>>>I'm creating a class with a property (array) that holds the result of a query. I always declare my variables before I use them. And I want to SELECT ... INTO ARRAY ... The problem is that I don't know the size of the query.
>>>>I don't like this... Do you?
>>>
>>>I think that in this case u will be better off by not decalring the array
>>>before the SELECT- SQL
>>>
>>>Arnon
>>
>>That's OK, but how to make it a property ? By declaring it twice, and then
>>moving all the data into the property, and then releasing the array created by the SQL SELECT ? Nah! I don't like it, should I?
>>
>>Thanx
>sorry - the solution is very simple
>u don't have to do anything special
>
>create an array property in the form (e.g. gaMyArray[1])
>and in the select just do
>SELECT myfield ... into array thisform.gaMyArray
>
>the array will redimention
>
>Arnon

for some reason, i always forget the 'thisform.'... it's easy enough to debug, but not much help here....
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform