Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Using multiple databases within application
Message
De
22/02/2000 10:47:23
Jerry Tovar
Dana Corporation Dana It
Maumee, Ohio, États-Unis
 
 
À
15/02/2000 08:08:04
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00331825
Message ID:
00335392
Vues:
12
>
>***********************
>I use the next program before generates APP or Exe with all my forms
>Note I use aDir() to know all my forms.
>
>* Programa: BorraDirFormas (EraseDirForms)
>* Escrito por: Carlos Fidel Restrepo Duperly
>* Fecha: 24-Jun-99
>* Abre una forma como tabla y elimina las referencias
>* de directorio para poder trabajar con varios sets de
>* datos sin problemas.
>* Como parámetro se pasa el nombre de la forma
>
>* It opens a form as table and deletes all directory references
>* allowing working with different databases.
>* The parameter is the form name
>
>Procedure BorraDirFormas(cForma)
>
>Close Tables All
>Clear
>* Elimina la terminación en caso de que sea pasada con el nombre de
>* la forma
>* Deletes extension if it exists.
>cForma = JustStem(cForma)
>Use (cForma+'.Scx')
>* Sí el nombre de la forma tiene la palabra "contab",
>* Se borra la información sobre el nombre de la base de datos
>* Nota cada vez que se modifica la forma, esta información se regenera
>
>* Busca por los registros que correspondan a "cursor"
>Scan For BaseClass='cursor'
> * Busca por "..\" y "\" y borra la información entre ellas
> * Looks for "Database" And "\" and deletes with in them.
> cPropiedad = Properties
> nPos1 = At('..\',cPropiedad)
> nPos2 =At('\',cPropiedad,2)
>
> * Evita que cambie la fecha de los archivos de las formas sí esta información
> * ya ha sido eliminada.
> * When the database properties had been removed it doesn't change
> * the form preserving the original form date
>
> If nPos1 > 0
> Replace Properties With;
> Stuff(cPropiedad,nPos1, nPos2 - nPos1 + 1,'')
> EndIf
>EndSCan
>
>Use
>
>Return


Thanks for the response. I believe this will work. I planned on doing something similar to this, however, the way I plan on maintaing the different copies of the same DBC and DBFs now is to keep them in separate directories and depending on which DBC the user opened, I will open that DBC and SET PATH TO that directory.

This seems to work ok, the forms know where the DBFs and Views are.

Thanks,
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform