General information
Category:
Coding, syntax & commands
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.
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