PC SOFT

AYUDA EN LÍNEA
DE WINDEV, WEBDEV Y WINDEV MOBILE


  • Multiple changes of directory
  • Changing the name of data file
  • Substituting directories
  • Various
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReportes y ConsultasCódigo de Usuario (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Código Navegador
WINDEV Mobile
AndroidWidget Android iPhone/iPadApple WatchUniversal Windows 10 AppWindows Mobile
Otros
Procedimientos almacenados
HChangeDir (Function)
 
ODBCNo disponible con este tipo de conexión
  • Modifies the access path to a data file (which means the directory where the data file will be used). If the data file is opened when using HChangeDir, the data file is automatically closed.
    Reminder: By default, the physical file corresponding to the data file described in the analysis is handled in the directory specified in the analysis.
  • Changes the name of database associated with a table. In this case, the database name specified in the connection properties of table (in the data model editor) is ignored.
    To modify the connection parameters of a data file not in HFSQL format, we recommend that you use HDescribeConnection and HChangeConnection.
Java This function operates for the connections to a HFSQL database only.
Versiones 17 y posteriores
iPhone/iPad This function is now available for the iPhone/iPad applications.
Nueva funcionalidad versión 17
iPhone/iPad This function is now available for the iPhone/iPad applications.
iPhone/iPad This function is now available for the iPhone/iPad applications.
Versiones 18 y posteriores
Widget Android This function is now available in Android Widget mode.
Universal Windows 10 App This function is now available in Windows Store apps mode.
Android This function is now available for the Android applications (for the HFSQL data files).
WINDEVJava This function is now available for the Java applications.
Nueva funcionalidad versión 18
Widget Android This function is now available in Android Widget mode.
Universal Windows 10 App This function is now available in Windows Store apps mode.
Android This function is now available for the Android applications (for the HFSQL data files).
WINDEVJava This function is now available for the Java applications.
Widget Android This function is now available in Android Widget mode.
Universal Windows 10 App This function is now available in Windows Store apps mode.
Android This function is now available for the Android applications (for the HFSQL data files).
WINDEVJava This function is now available for the Java applications.
Versiones 21 y posteriores
Universal Windows 10 App This function is now available in Universal Windows 10 App mode.
Nueva funcionalidad versión 21
Universal Windows 10 App This function is now available in Universal Windows 10 App mode.
Universal Windows 10 App This function is now available in Universal Windows 10 App mode.
señalar: A partir de la versión 19, HFSQL es el nuevo nombre de HyperFileSQL.
Ejemplo
WINDEVWEBDEV - Código ServidorReportes y ConsultasJavaAjaxCódigo de Usuario (UMC)HFSQLHyper File 5.5
// Create the HFSQL Classic Stat file in
// "C:\Statistics\January"
HChangeDir(Stat, "C:\Statistics\January")
HCréation(Stat)
WINDEVWEBDEV - Código ServidorReportes y ConsultasWindows MobileAjaxCódigo de Usuario (UMC)HFSQL Client/Server
// Create the HFSQL Client/Server Stat file in "\January\"
// This directory is found at the root
// of database folder (HFSQL Client/Server connection)
HChangeDir(Stat, ".\January\")
WINDEVWEBDEV - Código ServidorReportes y ConsultasAjaxCódigo de Usuario (UMC)OLE DBConectores Nativos
// File associated with a connection by OLE DB.
// Replace the database that will be used for the "Customers" table
HChangeDir(Customers, "C:\Temp\MyTestDB.mdb")
HCréation(Customers)
// The "Customers" table was created in the "c:\temp\mytestdb.mdb" database
// The "Customers" table of database ("c:\temp\myinitialdb.mdb") was not modified
Sintaxis
WINDEVWEBDEV - Código ServidorReportes y ConsultasiPhone/iPadWindows MobileUniversal Windows 10 AppJavaAjaxCódigo de Usuario (UMC)HFSQLHFSQL Client/ServerHyper File 5.5

Use with HFSQL data files Ocultar los detalles

<Result> = HChangeDir(<Logical File Name> , <New File Path>)
<Result>: Boolean
  • True if the operation was performed,
  • False if a problem occurred. HError is used to identify the error.
<Logical File Name>: Character string (with or without quotes)
Logical name of HFSQL data file (defined in the analysis).
If this parameter is equal to "*", the change of directory will be applied to all known data files (described in the analysis).
This parameter can also correspond to the name of a group of data files (or custom-folder) defined in the analysis.
<New File Path>: Character string (with quotes)
Access path to data file (up to 260 characters). This path can contain the name of drive and directories, or it can be a relative path.
If the path is a relative path, the "." (or "?") character is used to specify the current directory and the ".." character is used to specify the parent directory.
If this parameter corresponds to an empty string (""), the data file will be handled in the directory specified in the analysis.
Windows Mobile No relative path can be used.
HFSQL Client/Server The access path to the data file must be relative to the database found on the server. You cannot specify a path outside the database. A WLanguage error occurs when attempting to access data files outside the database. For example:
Valid path:
HChangeDir(FileName, "SUBDIR")

OR

HChangeDir(FileName, ".\SUBDIR")

Invalid path:
HChangeDir(FileName, "C:\DB\SUBDIR")

The new path will be automatically created if it is valid and if it does not exist.
Versiones 17 y posteriores
iPhone/iPad This parameter can correspond to a full path or to a relative path in relation to the current directory (returned by fCurrentDir). This parameter is case sensitive.
Reminder: On iPhone/iPad, an application has the rights to write into its setup directory or into one of its sub-directories.
Nueva funcionalidad versión 17
iPhone/iPad This parameter can correspond to a full path or to a relative path in relation to the current directory (returned by fCurrentDir). This parameter is case sensitive.
Reminder: On iPhone/iPad, an application has the rights to write into its setup directory or into one of its sub-directories.
iPhone/iPad This parameter can correspond to a full path or to a relative path in relation to the current directory (returned by fCurrentDir). This parameter is case sensitive.
Reminder: On iPhone/iPad, an application has the rights to write into its setup directory or into one of its sub-directories.

Use with HFSQL data files Ocultar los detalles

<Result> = HChangeDir(<Logical File Name> , <New File Path>)
<Result>: Boolean
  • True if the operation was performed,
  • False if a problem occurred. HError is used to identify the error.
<Logical File Name>: Character string (with or without quotes)
Logical name of HFSQL data file (defined in the analysis).
If this parameter is equal to "*", the change of directory will be applied to all known data files (described in the analysis).
This parameter can also correspond to the name of a group of data files (or custom-folder) defined in the analysis.
<New File Path>: Character string (with quotes)
Access path to data file (up to 260 characters). This path can contain the name of drive and directories, or it can be a relative path.
If the path is a relative path, the "." (or "?") character is used to specify the current directory and the ".." character is used to specify the parent directory.
If this parameter corresponds to an empty string (""), the data file will be handled in the directory specified in the analysis.
Windows Mobile No relative path can be used.
HFSQL Client/Server The access path to the data file must be relative to the database found on the server. You cannot specify a path outside the database. A WLanguage error occurs when attempting to access data files outside the database. For example:
Valid path:
HChangeDir(FileName, "SUBDIR")

OR

HChangeDir(FileName, ".\SUBDIR")

Invalid path:
HChangeDir(FileName, "C:\DB\SUBDIR")

The new path will be automatically created if it is valid and if it does not exist.
Versiones 17 y posteriores
iPhone/iPad This parameter can correspond to a full path or to a relative path in relation to the current directory (returned by fCurrentDir). This parameter is case sensitive.
Reminder: On iPhone/iPad, an application has the rights to write into its setup directory or into one of its sub-directories.
Nueva funcionalidad versión 17
iPhone/iPad This parameter can correspond to a full path or to a relative path in relation to the current directory (returned by fCurrentDir). This parameter is case sensitive.
Reminder: On iPhone/iPad, an application has the rights to write into its setup directory or into one of its sub-directories.
iPhone/iPad This parameter can correspond to a full path or to a relative path in relation to the current directory (returned by fCurrentDir). This parameter is case sensitive.
Reminder: On iPhone/iPad, an application has the rights to write into its setup directory or into one of its sub-directories.
WINDEVWEBDEV - Código ServidorReportes y ConsultasWindows MobileAjaxCódigo de Usuario (UMC)OLE DBConectores Nativos

Use with an OLE DB access or native access Ocultar los detalles

<Result> = HChangeDir(<Logical File Name> , <New Database>)
<Result>: Boolean
  • True if the operation was performed,
  • False if a problem occurred. HError is used to identify the error.
<Logical File Name>: Character string (with or without quotes)
Logical name of table (defined in the analysis).
If this parameter is equal to "*", HChangeDir is ignored.
Caution: If this parameter is equal to "*" and if one of the data files found in the analysis was associated with a connection (HChangeConnection) before the call to HChangeDir, the directory modification will be taken into account for this data file when closing the connection.
<New Database>: Character string (with quotes)
Access path to database to use (up to 260 characters). In this case, the database name specified in the connection properties of table in the analysis is ignored.
This path can contain the name of drive and directories, or it can be a relative path.
If the path is a relative path, the "." (or "?") character is used to specify the current directory and the ".." character is used to specify the parent directory.
Windows Mobile No relative path can be used.
Observaciones

Multiple changes of directory

HChangeDir can be called several times with different parameters. When the path is redefined several times for the same data file, the last specified path replaces all the other ones.

Changing the name of data file

HChangeDir can only be used to change the access path to the physical data file. To modify the physical name of data file, use HChangeName.

Substituting directories

HChangeDir is used to associate a directory with a data file. To substitute a directory for another one, use HSubstDir.
Caution: The substitution of directory performed by HSubstDir applies to the directory defined by HChangeDir. For example:
HSubstDir("C:\Statistics\January", "C:\New\JanStats")
HChangeDir(Stat, "C:\Statistics\January")
HCréation(Stat) // File created in C:\New\JanStats

Various

  • If the management of ".REP" is enabled (HSetREP), the path modification is saved in ".REP" file (see management of .REP).
  • Closing the data file stores the new path but does not store a possible password specified when opening the data file.
  • HChangeDir is equivalent to HAssign available in the earlier versions.
  • This function can be used when establishing a connection with a HFSQL server.  Atención: El orden en el que se llaman las funciones para conectarse a una base de datos HFSQL Client/Server es importante.. Ver Optimización de los tiempos de conexión a las bases de datos HFSQL Client/Server para más detalles.
  • Conectores Nativos HChangeDir can be used with the Native XML Access.
Componente : wd240hf.dll
Versión mínima requerida
  • Versión 9
Esta página también está disponible para…
Comentarios
Haga clic en [Agregar] para publicar un comentario