Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to define a dynamic array
Message
From
08/06/2004 05:31:34
 
 
To
08/06/2004 04:31:19
Yim Ming Sun Derek
Spacious Design Consultant
Hong Kong, Hong Kong
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00911025
Message ID:
00911039
Views:
21
Just declare your array initially as say laMyArray( 1, x) (where x is no. of fields in your table).
When you read the table you get the no. of records/rows via Reccount() (store in a var), then just
DIMENSION your array with this var.

e.g.

Select MyTable
lnNoRows = RECCOUNT()
DIMENSION laMyArray( lnNoRows, x)

But if you SQL Selectyour table into an array then it will be created, ready-dimensioned for you anyway.

Terry

>Hi,
>
>How to declare a dyhamic array because I don't known the size of this array
>before a single table load into it.
>
>
>Please advice
>
>Derek Yim
- Whoever said that women are the weaker sex never tried to wrest the bedclothes off one in the middle of the night
- Worry is the interest you pay, in advance, for a loan that you may never need to take out.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform