Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Intellisense on arrays?
Message
 
 
To
27/02/2005 09:53:54
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 8 SP1
OS:
Windows XP SP1
Miscellaneous
Thread ID:
00990972
Message ID:
00991008
Views:
16
>When I do the following:
>
Select * FROM SomeTable INTO ARRAY laARRAY WHERE bla-bla-bla
>Is there some way to refer to the columns in the array based on the names of the fields in the table? Or, must I simply know the order of the columns in the table, and use an appropriate index number?
>
You can but I'm not sure if it worth it.
USE (HOME(2) + "\data\products")
Select * FROM products INTO ARRAY laARRAY
AFIELDS(laFields, "products")
* Product Name 
lnRow = 1
lnCol4ProdName = ASCAN(laFields, "Prod_Name", -1, -1, 1,1+2+4+8)
? laARRAY[lnRow, lnCol4ProdName]
Another way
#DEFINE lnCol4ProdNAme 2
? laARRAY[lnRow, lnCol4ProdName]
--sb--
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform