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
  • Password management
  • Creating or opening a data file
  • Opening a data file that is already opened
  • Managing the list of data files used (.REP)
  • Managing fatal errors
  • Opening a connection and the specified table
WINDEV
WindowsLinuxJavaReportes y ConsultasCódigo de Usuario (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Código Navegador
WINDEV Mobile
AndroidWidget Android iPhone/iPadIOS WidgetApple WatchMac Catalyst
Otros
Procedimientos almacenados
Opens a data file.
Remark: Data file opening is automatically managed. However, in some cases, you may have to explicitly open a data file (to check the file existence or the password validity for example).
Ejemplo
// Open Customer data file
HOpen(Customer)
// Open all data files with the password "PSW".
HOpen("*", "PSW")
// Check status report of HOpen
IF HOpen(Customer, "ABCD", hORead) = False THEN
Error("Unable to open the Customer data file" + HErrorInfo())
END
Sintaxis
<Result> = HOpen([<Data file> [, <Password>] [, <Access mode>]])
<Result>: Boolean
  • True if the data file was opened.
  • False if a problem occurred (wrong password, ...). HError is used to identify the error. HErrorInfo returns more details.
<Data file>: Optional character string
Name of data file used (logical name, defined in the analysis).
If this name is not specified, HOpen will use the last data file used by the last HFSQL function (function starting with "H").
If this parameter is corresponds to "*", all the data files described in the analysis are opened. If the password is specified, this password will be used to open all the data files.
This parameter can also correspond to the name of a group of files (or custom-folder) defined in the analysis (not available in Android and Android widget). If the password is specified, this password will be used to open all the data files of the group.
Warning: this parameter cannot correspond to a File description type variable.
<Password>: Optional string or Secret string
Password of the data file.
If no password is associated with the data file, you have the ability to use an empty string ("").
Novedad versión 2025
Cadenas secretas: Si utiliza el almacén de cadenas secretas, el tipo de cadena secreta utilizado para este parámetro debe ser "ANSI o Unicode string".
Para obtener más información sobre las cadenas secretas y el almacén, consulte Almacén de cadenas secretas.
<Access mode>: Optional integer constant
Configures the access mode to the data file.
If this parameter is not specified, the data file will be opened according to its characteristics (if the data file is read-only, it will be opened in read-only ; if the data file is read/write, it will be opened in read/write mode).
hOReadThe data file can be accessed in read-only mode. It is only possible to read records. It is not possible to add or remove records.
hOReadWriteThe data file can be accessed in read/write mode. It is possible to read and write new records.

Hyper File 5.5 This parameter is ignored.
PHP This parameter is ignored.
Observaciones

Password management

The password can be specified:
  • when the data file is opened with HOpen,
  • before the data file is opened with HPass.

Creating or opening a data file

HCreationIfNotFound can replace HOpen. Indeed, if the data file exists, it is automatically opened.

Opening a data file that is already opened

If HOpen is used on a data file already opened with a different <Access mode>, the filters, locks and characteristics of the current iteration are lost.

Managing the list of data files used (.REP)

WINDEV Mobile allows you to update a list of data files used by the application (equivalent to the.REP file in WINDEV).
HOpen specifies the list of data files used by the application (.REP for WINDEV and WEBDEV) if updates are enabled for this list.

Managing fatal errors

If a fatal error occurs when opening a data file, it may be interesting to continue the program while processing the error. To do so, we recommend that you perform the following exception process:
WHEN EXCEPTION IN
	HOpen(PARENT)
DO
	Error("HFSQL error: " + HError())
ELSE
	Trace("File opened")
END
PHP Not available.
WINDEVWEBDEV - Código ServidorReportes y ConsultasJavaCódigo de Usuario (UMC)Lenguaje ExternoPHPOLE DBConectores Nativos

Opening a connection and the specified table

If necessary, HOpen opens the connection to the database before opening the specified table. If the connection is already open (with the same parameters), this connection is automatically used.
Note: The default connection used corresponds to the connection associated with the table in the data model editor.
Componente: wd300hf.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

Última modificación: 16/05/2025

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