Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Sys(2015) and SELECT ... INTO Table
Message
From
19/08/2002 14:23:26
 
 
To
19/08/2002 13:13:49
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00691029
Message ID:
00691157
Views:
15
This message has been marked as a message which has helped to the initial question of the thread.
Just add a property to your form the same as any other property, but call it, for instance, aTables[1]

It will show up in your form properties as aTables[1,0], and you can use it just like any other array. Add the first table to the array:
ThisForm.aTables[1] = Sys(2015)   && add 1st table to array
And then whenever you want to add another:
Dimension ThisForm.aTables[Alen(ThisForm.aTables,1) + 1]  && increment table array by 1
ThisForm.aTables[Alen(aTables,1)] = Sys(2015)  && create a table name in last array row
Create Table (ThisForm.aTables[Alen(aTables,1)]) (Field1 C(10), Field2 ... etc)
Or you could add them in a For Loop.

When you use the tables,
Use (ThisForm.aTables[3]) in 0 alias Table3 && or whatever alias you like
Then just refer to the alias Table3 the same as you would any other.

When you're done with them, you can close them all in a loop:
For lnCount = 1 to Alen(ThisForm.aTables,1)
  If used (ThisForm.aTables[lnCount])
    use in (ThisForm.aTables[lnCount])
  Endif
EndFor
Alan

>Thanks Alan
>
>But , i don´t Know how use an array property .
>Can you give me one example ?
>
>Thanks
>
>>Along with what Hilmar said, since you want to use more than one table (at >least that's what I think you said), consider using an array property. In >fact, if the tables need to be used 'globally', consider using an array >property in an application class.
Previous
Reply
Map
View

Click here to load this message in the networking platform