Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
LINKING A FREE TABLE TO A VIEW
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Problèmes
Divers
Thread ID:
00048376
Message ID:
00048443
Vues:
19
Barbara,

To add over wat Nick said, you if your free table is not within the VFP path, you need to provide it to the view. The problem with this approach is that you are obliged to keep your free table in the same relative path.

If the path is subject to change, here's what I do:
1) In my preferenceform, ask the user where they have their free tables (in one off my systems, the accounting tables)
2) Save the full path in the registry.
3) Rerun the view definition (saved as a PRG) to update the path definition. Something like this:

* Program...........: LV_PROVIDERS.PRG
* Author............: José Constant
* Project...........: AutoSoft
* Created...........: 30/01/97 21:07:25
* Copyright.........: (c) CSS, jose@club.innet.be, 1997
*) Description.......:
* Calling Samples...: has to be done manually because of connecting path
* : to comptabilité Saari
* Parameter List....:
* Major change list.:

#INCLUDE "c:\cdbk30\common30\include\framincl.h"
LOCAL lcOldSafety

lcOldSafety = SET("SAFETY")
SET SAFETY OFF

lcTiers = ALLTRIM(GoApp.GetSetting(COMPTADIR_KEY, APPCLASS))+"tiers"

CREATE SQL VIEW "LV_PROVIDERS" ;
AS SELECT SUBSTR(Tiers.comp, 4, LEN(tiers.comp) -3) AS cCode, ;
Tiers.nom, ;
Tiers.ad1, ;
Tiers.ad2, ;
Tiers.ad3, ;
Tiers.cp, ;
Tiers.vill, ;
Tiers.tele, ;
Tiers.fax ;
FROM &lcTiers ;
WHERE Tiers.comp = "440" ;
AND Tiers.comp <> "440000" ;
ORDER BY cCode


José

>I am linking a free table to my input table in a view via a uniquely defined field. The link occurs in generating the view and I have no problem while running my program in VFP, but when I create my executable, it tells me it cannot find the table and asks if I want to locate it. I can then locate my table and my executable runs fine. But I don't want the user to have to go through that step.
>
>Any help?
>
>Barbara Smith
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform