Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Adding to the data environment programmatically
Message
De
12/04/2016 01:04:22
Lutz Scheffler
Lutz Scheffler Software Ingenieurbüro
Dresden, Allemagne
 
 
À
11/04/2016 23:39:32
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows 7
Database:
Visual FoxPro
Application:
Desktop
Divers
Thread ID:
01634683
Message ID:
01634688
Vues:
54
>Is there a way to, at the beginning of a form, to add the data files to the data environment programmatically, or set a path for the DE to use before opening files? The problem I am having is that locally, or over the LAN, an app works just fine, and opens the files it needs using path strings, which change quite regularly, for example:
>
>
>thislanfile=&mlanpath+'abc.dbf'
>USE "&thislanfile" IN 0
>
>
>That works great, but when a user RDP's in, it doesn't work. Using messagebox, I can see that the machine/folder/dbf is correct, but I get error 1 in the 'use' line. Any help will be much apperciated!
>
>Thanks.

Would Yes be helpfull?

A DE has a [Before]OpenTables event, a Form a Load event. Here you might set paths etc
Check the help there

A form has a BindControl property, also usefull.

Remember that controls do not bound to a table, they bound to an alias.
Words are given to man to enable him to conceal his true feelings.
Charles Maurice de Talleyrand-Périgord

Weeks of programming can save you hours of planning.

Off

There is no place like [::1]
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform