- Code: Select all Expand view
aOrders := {}
for i := 1 to 7
cCnt := ltrim(str(i))
aadd(aOrders, oDbf:order&cCnt)
next
Where in the end, aOrders would contain the value of oDbf:order1, oDbf:order2, oDbf:order3,....oDbf:order7. What annoys me is the reverse isn't true. That is, the following won't work.
- Code: Select all Expand view
for i := 1 to 7
cCnt := ltrim(str(i))
oDbf:order&cCnt := aOrders[i]
next
The values just seem can't be assigned to the database object. Can anyone shed a light on why it's so and a workaround? I'm hoping to avoid having to code it line by line as such
- Code: Select all Expand view
oDbf:order1 := aOrders[1]
oDbf:order2 := aOrders[2]
oDbf:order3 := aOrders[3]
.
.
.
oDbf:order7 := aOrders[7]