Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Using two variables to open a file
Message
De
30/01/2002 03:06:18
Lutz Scheffler
Lutz Scheffler Software Ingenieurbüro
Dresden, Allemagne
 
 
À
30/01/2002 01:59:59
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00612617
Message ID:
00612627
Vues:
28
Hi Michel,
USE don't like variables.
I have little trouble to understand your var (gcMainDBF) as data path.
Assuming you mean PATH and FILE NAME try:
lcFile = ADDBS(gcMainDbf)+tcChildTable
USE (lcFile) IN 0
*also if gcmainDBf holds all Backslashes needed
USE &gcMainDbf.&tcChildTable IN 0
assuming you mean DATABASE and TABLE try:
lcFile = gcMainDbf+'!'+tcChildTable
USE (lcFile) IN 0
*also works
USE &gcMainDbf.!&tcChildTable IN 0
HTH
Agnes
>I've faced that situations at few occasions and was wondering what you think.
>
>Lets say I have a data path and a file name variables. So, to open that file, I would then use:
>
>
>USE gcMainDbf+''+tcChildTable IN 0
>
>
>as if I use:
>
>
>USE gcMainDbf+tcChildTable IN 0
>
>
>that won't work.
>
>I personally never used a file name that contains a +. Is that possible? If not, then, this should be calculated and not searched as is for a file that matches that entire string.
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
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform