Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Open Database or Table by virtual path?
Message
From
27/07/2006 11:06:28
 
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
01140576
Message ID:
01140712
Views:
14
>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
Previous
Reply
Map
View

Click here to load this message in the networking platform