Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
A moved view still looks at data in original directory
Message
From
31/10/1999 14:17:15
 
 
To
31/10/1999 13:04:13
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00284536
Message ID:
00284555
Views:
9
>Hi,
>
>We have written an application which allows the user to make a backup copy of their data directory. They can do this as many times as they wish, and can use one or more of these backups for training [the application allows the user to specify which directory contains her data].
>
>The dbc and dbf files etc. are simply copied to the new directory.
>
>This all works fine, except that two views are included in the dbc. We have found that these views still get data from the directory they were originally copied instead of the new directory which the dbc has been copied into.
>
>I'm assuming that the view stores a path to the table[s] it is based on when it is originally created. If we remove the original directory, everything works fine, so the view must look for the original and, if it doesn't find it, look along the path for the tables it is based on.
>
>How do we get around this ?
>
>Best.
>
>Matt.

The problem is that VFP keeps DE.Cursor.Database properties exactly the same as it was on development workstation, and it includes path and dbc file name. If it cannot find it then it goes by SET PATH to look for. So, to make application safer you may reset all Cursor.Database properties programmatically in DE.BeforeOpenTables event.
Edward Pikman
Independent Consultant
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform