Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Change data source of data environment
Message
From
20/03/2004 03:46:08
 
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00887938
Message ID:
00888174
Views:
13
Hi,

>>
Is is possible to change what the location of the tables are using the data environment depending on how an application is ran.
>>

Here's a bit of generic code that I run prior to DE.OpenTables() occurring; gcDataDirectory being the required path:
LPARAMETER theDE,theDB
LOCAL lnCount,loObject
LOCAL ARRAY laMembers(1)

IF AMEMBERS(laMembers,thede,2) > 0
  FOR lnCount = 1 TO ALEN(laMembers,1)
    loObject = EVAL("theDe."+laMembers(lnCount))
    IF UPPER(ALLTRIM(loObject.BaseClass))="CURSOR"
      loObject.Database = gcDatadirectory+thedb
    ENDIF
    LoObject = .NULL.
  ENDFOR
ENDIF
HTH,
Viv
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform