Information générale
Catégorie:
Codage, syntaxe et commandes
Send your SQL output directly to a local array variable:
select * from MyTable into array laMyArray
acopy(laMyArray,THISFORM.iaMyArray)
= MyProgram(@laMyArray)
While the solution adds one step (e.g., acopy), it is in keeping with a coding specification that I try to follow: Do all work possible to local variables and distribute them to and from their target and source data items when the work is beginning or done. This affords several things:
1. The beginning of all my methods or PRG procedures do the initial work of bringing in all my working data material from whatever sources.
2. The end of the same methods or procedures then put everything back into place.
Therefore, I never have to wade through state changing code looking for where things are coming from or going to. I ever have to look to the beginning or ending of the code to see data sources and targets.
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