Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
VFP 5.0 - Dataenvironment - Finding open tables
Message
From
16/12/1996 14:04:02
 
 
To
16/12/1996 09:14:19
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00015076
Message ID:
00015254
Views:
36
>>>If Dataenvironment.AutoOpenTables=.t. all tables are open unless you close them manually. Otherwise if AutoOpenTables=.f. all tables are closed until you call Dataenvironment.Opentables and again all tables will be open.
>>>If you want to check dataenvironment for not only current form but also for some parent form you can just check cursor names (store them in array?) from both Dataenvironments.
>>
>>
>>Thats exactly what I need to know how to do. Is how to check the DataEnvironment for the cursors?
>
>Sorry, I was off for weekend. You can check any Dataenvironment.Cursor.Alias properties. So firstly you going through all cursors:
>
> cNumber="1"
> do while type(formname.dataenvironment.cursor&cNumber.)="O"
> aTablenames[val(cNumber)]= ;
> formname.dataenvironment.cursor&cNumber..name
> cNumber=alltrim(str(val(cNumber)+1))
> enddo

Thanks for the tip. I worked some more on this problem over the weekend and came up with another solution also. There is a built in function called AUSED which places all the aliases as well as work areas of all the files open in the data environment into an array. Basically same thing as you wrote but in 1 line of code. Again thanks.
Mike Laubach
IP Services Inc
mlaubach@ipserv.net
Previous
Reply
Map
View

Click here to load this message in the networking platform