Change databases

The place to discuss FoxPro issues not directly related to ProMatrix.

Change databases

Postby btiguy » Wed Aug 14, 2013 4:03 pm

I am developing an app. So I develop a form in \MyFolder where the tables and dbc's reside. Then I make a new folder \MyFolder2 and copy the forms to the new folder \MyFolder2. When I run the form in \MyFolder2, the DE looks at the original \MyFolder and not to the tables in \MyFolder2. How do I correct the forms in \MyFolder2 to look within the new folder?
TIA
Don
btiguy
 
Posts: 455
Joined: Mon Jun 21, 2010 4:03 pm

Re: Change databases

Postby Bob » Thu Aug 15, 2013 4:51 am

Open the form in the form designer, then open the DE. Remove the tables there then re-add them from the correct folder.
Bob
 
Posts: 718
Joined: Mon Jun 14, 2010 6:53 am
Location: Near Albany, NY

Re: Change databases

Postby btiguy » Thu Aug 15, 2013 6:31 am

I was afraid of that. I often "USE" the MyForm.scx and manually change the "database =" statement. I know that can be dangerous, but it works.

Thanx anyway. I was hoping for a more efficient way.
TIA
Don
btiguy
 
Posts: 455
Joined: Mon Jun 21, 2010 4:03 pm

Re: Change databases

Postby Bob » Thu Aug 15, 2013 12:57 pm

I think if you renamed the original folder VFP might ask you to locate the 'correct' folder which is the new folder of course, and make the necessary changes for you.
Bob
 
Posts: 718
Joined: Mon Jun 14, 2010 6:53 am
Location: Near Albany, NY

Re: Change databases

Postby hgm » Wed Aug 28, 2013 12:25 pm

We use 2 datasets, one for the development versions of tables and one for the production versions.

If you have the path set to include all your tables, opening the table without specifying the path works. In a form, open, order and relate the tables in the beforeopentables method.
hgm
 
Posts: 7
Joined: Wed Jun 30, 2010 11:05 am
Location: Chicago, NE Indiana


Return to Visual FoxPro

Who is online

Users browsing this forum: No registered users and 1 guest

cron