General information
Category:
Forms & Form designer
Hi,
>I am using Visual foxpro Backend in my application. Most of the Data Entry forms in my applications have private datasessions where i have added all the tables, views etc.
>The problem is the application and the data folder, both are on different Drives under different folder.
>At the time the Exe is executed, i am specifying the database path and opening the database. The problem is when i am running a form, i get the error that it cant find the database.
>Do i need to code something in the form load to specify the database path to a different location.
>Any solutions would be grateful!
You could set the .Database property of each cursor in the DE.BeforeOpenTables().
Regards,
Viv
Hi
What I do is what Viv tells you. When I'm developing my database and tables are in c: . When I install the app the database may be anywhere else, so all I need is some file to be read by the exe that tells where is the db now. Then I point all the tables and views there. I do that in DE.BeforeOpenTables(). I have an object that executes there and goes object by object and changes the database property in each cursor. Let's say
during development
c:\mydir\mydata\mydatabase.dbc
in the DE.BeforeOpenTables() changes to
f:\mynewdir\mynewdata\mydatabase.dbc
so, when the DE opens all tables and views, knows where are they.
Hernan
Previous
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only