>This may seem like a stupid Visual Foxpro question but I created a database with classes,tables, forms and menu. It works fine but I would like to modify it. If I copy it from my network drive and put it on my c: drive how do I tell it that it has a new location. Somewhere in the DBC it is keeping track of the location of where it was created. All the tables and programs are pointing to the network. How can I change my test Project and DBC to point to the new location and forget all about where it use to live? When I go to run a program that opens up my forms it opens the forms on the server, not my c: drive. Any ideas, this is driving me nuts.
Two ways out of this:
1 - hide the source drive. If your original tables are on the z: drive, unmap the Z: drive. This way is OK, and your app will work - it does store them with relative paths anyway, but compiles them with full paths, and uses these full paths if available. If not, it uses the relative paths. No, no theoretical background here - just been there, done that.
2 - add some code to your .dataenvironment.beforeopentables, which will set the data paths straight. You can set the locations of your tables relative to whatever you like before they get actually opened. I've actually written some generic code which I call like this: oApp.SetDataPaths(this), i.e. I'm passing the dataenvironment as a parameter to it.
If you need a sample of this piece of code, just tell me. It may be proprietary to the company where I work, so I'd have to strip the details.