Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Question regarding Arrays
Message
De
05/03/2003 19:17:11
 
 
À
05/03/2003 19:00:26
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00761881
Message ID:
00761884
Vues:
29
This message has been marked as a message which has helped to the initial question of the thread.
Hi William,

Try:
FOR lnBrCount = 1 TO ALEN(laBranch,1)
  SELECT Loaninfo.* ;
  FROM Loancomm!loaninfo ;
  WHERE Loaninfo.cbranch = laBranch[lnBrCount] AND MONTH(Loaninfo.dcommdate) = lnBrCount AND YEAR(Loaninfo.dcommdate) = nType ;
  GROUP BY 4 ;
  ORDER BY Loaninfo.cbranch ;
  INTO ARRAY vaTest
  *-- do your stuff here...
  DIMENSION vaTest[1]
ENDFOR
HTH

Ric

>Hi,
>
>My question is Can an array which is created by a SELECT-SQL statement be refreshed with new data if the SELECT-SQL statement is re-ran, say from within a FOR loop? If not, how can this be done?
>
>FOR lnBrCount = 1 TO ALEN(laBranch,1)
> SELECT Loaninfo.* ;
> FROM Loancomm!loaninfo ;
> WHERE Loaninfo.cbranch = laBranch[lnBrCount] AND MONTH(Loaninfo.dcommdate) = lnBrCount AND YEAR(Loaninfo.dcommdate) = gnType ;
> GROUP BY 4 ;
> ORDER BY Loaninfo.cbranch ;
> INTO ARRAY vaTest
>ENDFOR
>
>I tried RELEASE vaTest after the FOR loop, so that the SELECT statement can recreate vaTest with the new data during the next instance of lnBrCount, but it seems that it doesn't redimension the array.
>
>Any suggestions are appreciated.
>
>Thank you,
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform