Information générale
Catégorie:
Codage, syntaxe et commandes
>>>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
Précédent
Suivant
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement