AYUDA EN LÍNEA
 WINDEVWEBDEV Y WINDEV MOBILE

Este contenido se ha traducido automáticamente.  Haga clic aquí  para ver la versión en inglés.
Ayuda / WLanguage / Administrar bases de datos / HFSQL / Funciones HFSQL
  • Example 1: Performing multiple directory substitutions (HFSQL data files)
  • Example 2: Changing the database name (OLE DB)
HSubstDir (Example)
Example 1: Performing multiple directory substitutions (HFSQL data files)
WINDEVWEBDEV - Código ServidorReportes y ConsultasCódigo de Usuario (UMC)AjaxHyper File 5.5 The following example is used to perform some directory substitutions:
  • for data files described in the "Current directory"
  • for data files described in a specific directory (C:\File).
// Close all data files before changing directory
HClose("*")

// Change directory for data files defined in
// the "current directory" in the analysis
HSubstDir(".", "d:\file")

// Change directory for data files defined in
// a specific directory in the analysis
HSubstDir("c:\file", "d:\file")

// Open/create data files in the new directory
HCreationIfNotFound("*")
Example 2: Changing the database name (OLE DB)
WINDEVWEBDEV - Código ServidorReportes y ConsultasCódigo de Usuario (UMC)AjaxOLE DB This example is used to change the name of the database. The name of the database specified in the analysis is "c:\Access\MaDatabase.mdb." However, on the client's workstation, the name of the database is not necessarily identical (e.g., "d:\My Documents\DataBaseClient.mdb").
HSubstDir enables you to change the name of the database that will be used by all the OLEDB tables associated with a connection on the "c:\Access\MyDatabase.mdb" database.
// Close all data files before changing directory
HClose("*")

// Change the name of the database
// here an Access database: MaDataBase.mdb
HSubstDir("c:\Access\MyDatabase.mdb", "d:\My Documents\CustomerDatabase.mdb")

// Open/create data files in the new database
HCreationIfNotFound("*")
Versión mínima requerida
  • Versión 9
Comentarios
Haga clic en [Agregar] para publicar un comentario

Última modificación: 27/03/2025

Señalar un error o enviar una sugerencia | Ayuda local