Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Datasets in different folders
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00488886
Message ID:
00489119
Views:
11
Larry,
That sounds just waht I am looking for. Where would this code go ? Into the Init of the form ?

Did you have any thoughts on my other point regarding how the dataenvironment cursor details seems to have hardcoded into the DBC directory structure , but if the app is copied out to site, or to another folder, it seems to automatically change the directory to the 'Current' directory.
This is great but I dont understand how it actually cahnges

Regards,

Gerard





>>Larry, thanks for your reply. I think I understand waht you are suggesting.. to Put code into the BeforOpenTablesMethod of the dataenvioronment to change the cursor location. My problem with this is that the Dataenvironment cannot be subclassed.. does this mean I must amend every single form that I use. Is there anywhere in my Base Class (either the form or somewhere else)that I could do this, so that I need to do it only once and it can be subclassed?
>>
>>One other thing I cannot understand with the dataenvironment. In my development pc, say I set up a Form and in the dataenvironment the Database Cursor is set to C:\MYDir\MyDBc. I then copy the whole system out to the client into f:\Apps and , without any modifications on my part, the dataenvironment cursor reads f:\Apps\Mydbc. If its hard coded, how come it changes automatically ?
>>
>>Regards,
>>
>>Gerard
>
>You can get away with putting the code in the Load event of the form by making a few changes.
>
>1. Change the AutoOpenTables property to .F. for the form's DE.
>2. Change the THIS reference to THIS.Dataenvironment where appropriate because THIS would refer to the form and not the DE.
>3. Add a THIS.Dataenvironment.OpenTables() at the end of the FOR...ENDFOR loop.
>
>This is essentially what Hiten gave you except that by changing the AutoOpenTables property, you don't need to issue a CloseTables at the beginning, because nothing will have opened yet and the DE will not have loaded.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform