toddsevans
Technical User
I am working on a function which will allow my users to deploy their data to an alternate directory. The problem I am having is that once I move the data I am unable to get my program to use the deployed data. Everything I have tried makes it look as though I have set the database properly but changes to data effect the tables in my program directory instead of the deployed data directory.
So I am wondering if because I used the data environment on my forms to handle opening and closing tables if I have also hard coded a path to the program directory. Should I be explicitly opening the tables with the full path in code instead of using the DE?
Here is my code to set the current database:
The Wait Window tells me that the current DBC is in the deployed data directory.
Anybody have a suggestion how to proceed?
Thanks,
Todd Evans
So I am wondering if because I used the data environment on my forms to handle opening and closing tables if I have also hard coded a path to the program directory. Should I be explicitly opening the tables with the full path in code instead of using the DE?
Here is my code to set the current database:
Code:
USE DOC IN 0
SELECT doc
STORE ALLTRIM(doc.data_dir) TO pc_data_dir
CLOSE TABLES ALL
CLOSE DATABASES ALL
OPEN DATABASE (pc_data_dir + "iloan.dbc")
SET DATABASE TO (pc_data_dir + "iloan.dbc")
WAIT WINDOW DBC()
Anybody have a suggestion how to proceed?
Thanks,
Todd Evans