Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Open Database or Table by virtual path?
Message
De
27/07/2006 11:06:28
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
01140576
Message ID:
01140712
Vues:
15
>Can you open a database or table, use 'set default" command, and "set path" commands with a virtual path instead of the so commonly seen physical path?
>
>Example Physical:
>
>use c:\beta\test.dbf
>
>
>Example Virtual:
>
>use \\{computer name}\beta\test.dbf
>
>
>I know the Virtual example is wrong, that's my question, can this be done?
>Just trying to eliminate drive mappings.


What worked best for me always, was to actually construct path at run time
and then open distinct databases an/or tables rather then set path and then open tables.

Oversimplified this would be something like ;

cDataRoot='\\servermachine'
cDataFolder='appdata'

cRunTimePath=addbs(cDataRoot) + cDataFolder
use ( cRunTimePath + 'MyTable.Dbf') in 0 shared


This aproach offers flexibility to place your production data
anywhere is suitable. All you need to change is couple of variables.
*****************
Srdjan Djordjevic
Limassol, Cyprus

Free Reporting Framework for VFP9 ;
www.Report-Sculptor.Com
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform