Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Identify location of DBC when installing new application
Message
From
17/10/2002 03:19:40
 
 
To
17/10/2002 02:01:44
Ken Miller
Pacific Coast Applications
Delta, British Columbia, Canada
General information
Forum:
Visual FoxPro
Category:
Project manager
Miscellaneous
Thread ID:
00712194
Message ID:
00712205
Views:
8
>I have read all manuals, worked with FoxPro since FoxBASE and have
>yet to successfully install my VFP application at any of my customers
>sights.
>
>I use the Project wizard to create the project. My main program contains all system setup values including a call to the app program VFP creates. It then reads the system table to get system and data paths. (local as well as server)
>
>What I need now is a program I can add to or call from my main program to tell the system where the DBC is located.
>

Hi Ken,
I don't think there is something ready to do that.
Problem that you are having is common in VFP development.
Here is scenario I am using at least.

1. You need loader application which stores localy just ROOT of your central (Network or local) data site. Could be ini file or free table.
At loader startup using path translation
table(s) on the server you will produce full
paths of your databases. I usualy populate public OBJECT
having method that returns full path to server database
e.g cDatabase=oData.get_database('MYDATABASE.DBC')
and object returns me '\\myserver\datadir\MYDATABASE.DBC'
Once data are located, loader can run your application.

2. All forms/reports that are using dataenvironment to open tables
must have 'patch' that will change database paths in DE cursors
which are normally set to development site paths - before actual opening of tables take place. I use DE.BeforeOpenTables() to do so.
If you are opening tables in code then you can use some code like

local cDatabase
cDatabase=oData.get_database('YOURDBC.DBC')
open database (cDatabase)
set database to (cDatabase)
use this ...
use that ...
etc.

Scenario I hv given you applies to LAN apps.

If you are using ODBC or OLEDB then you hv to programmaticaly
set up ODBC or OLEDB data sources.
I did not use this approach so perhaps someone who did can give
you better advice on this.

Hope this helps :-)
See ya
*****************
Srdjan Djordjevic
Limassol, Cyprus

Free Reporting Framework for VFP9 ;
www.Report-Sculptor.Com
Previous
Reply
Map
View

Click here to load this message in the networking platform