Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to get collection of opened tables in form DE
Message
From
05/08/2004 04:08:27
 
 
To
04/08/2004 22:06:19
Yh Yau
Ingenuity Microsystems Sdn Bhd
Kuala Lumpur, Malaysia
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00930269
Message ID:
00930903
Views:
15
Hi,

>>
I open the tables using "use" in the DE's opentables method. (Main reason for doing so is to allow a dynamic path to be specified). Does it mean that DE won't have any information if AUSED() is used?
>>

AUSED() will return all tables open in the current datasession - which isn't the same thing as the DateEnvironment. It should do what you need in this case.

But using 'USE' in the BeforeOpenTables() will not add the tables to the Dataenvironment so bear in mind that they will not be closed when the DE.CloseTables() executes.

If you want to add a table to the DE then use something like the following in the BeforeOpenTables():
THIS.ADDOBJECT("myCursor","Cursor")
WITH THIS.myCursor
  .ALIAS = "myTable"
  .CURSORSOURCE = "authcatlink"
  .DATABASE = "f:\current kkdata\kk.dbc"
  .BUFFERMODEOVERRIDE = 5
  &&etc.
ENDWITH
But if all you need to do is adjust the path then you can add the tables to the DE at design time and just assign the paths in BeforeOpenTables (eg):
FOR EACH o IN thisform.Dataenvironment
   IF o.baseclass = "Cursor"
   o.DataBase = "C:\mydata\mydata.dbc" && or o.CursorSource="" if free table
  ENDIF
ENDFOR
>>
Would there be any issue with "set refresh" not working to update the tables with other network users data is tables are opened with "use"?
>>
No
HTH,
Viv
Previous
Reply
Map
View

Click here to load this message in the networking platform