PC SOFT

ONLINE HELP
FOR WINDEV, WEBDEV AND WINDEV MOBILE

Home | Sign in | English US

  • Managing the password
  • 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
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadApple WatchUniversal Windows 10 AppWindows Mobile
Others
Stored procedures
Opens a data file.
Note: The opening of data files is managed automatically. However, in some cases, you may have to explicitly open a data file (to check the file existence or the password validity for example).
Versions 15 and later
Android This function is now available for the Android applications.
New in version 15
Android This function is now available for the Android applications.
Android This function is now available for the Android applications.
Versions 17 and later
iPhone/iPad This function is now available for the iPhone/iPad applications.
New in version 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.
Versions 18 and later
Android Widget This function is now available in Android Widget mode.
Universal Windows 10 App This function is now available in Windows Store apps mode.
New in version 18
Android Widget This function is now available in Android Widget mode.
Universal Windows 10 App This function is now available in Windows Store apps mode.
Android Widget This function is now available in Android Widget mode.
Universal Windows 10 App This function is now available in Windows Store apps mode.
Note: From version 19, HFSQL is the new name of HyperFileSQL.
Versions 21 and later
Universal Windows 10 App This function is now available in Universal Windows 10 App mode.
New in version 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.
Example
// Opens the Customer file
HOpen(Customer)
// Opens all files whose password is "PSW"
HOpen("*", "PSW")
// Check the status report of HOpen
IF HOpen(Customer, "ABCD", hORead) = False THEN
Error("Unable to open the Customer file" + HErrorInfo())
END
Syntax
<Result> = HOpen([<File Name> [, <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.
<File Name>: Optional character string (with or without quotes)
Name of data file used (logical name, defined in the analysis). If this name is not specified, HOpen handles the last data file used by the last function for HFSQL management (starting with the letter 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. If the password is specified, this password will be used to open all the data files of the group.
Caution: this parameter cannot correspond to a File Description variable.
<Password>: Optional character string (with quotes)
Password of data file.
If no password is associated with the data file, you have the ability to use an empty string ("").
<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).
hOReadWriteThe data file can be accessed in read/write. You have the ability to read the records and to write new records.
hOReadThe data file can be accessed in read-only. You only have the ability to read the records. No record can be added or deleted.
Hyper File 5.5 This parameter is ignored.
PHP This parameter is ignored.
Remarks

Managing the password

The password can be specified:
  • when the data file is opened by HOpen,
  • before the data file is opened by 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 that is already opened with a different <Access Mode>, the filters, the locks and the characteristics of the current browse 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 fills the list of data files used by the applications (.REP for WINDEV and WEBDEV) if the update is 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 - Server codeReports and QueriesWindows MobileJavaPHPUser code (UMC)External languageOLE DBNative Accesses

Opening a connection and the specified table

HOpen opens (if necessary) the connection to the database before opening the specified table. If the connection is already opened (with the same parameters), this connection is automatically used.
Note: The connection used by default corresponds to the connection associated with the table in the data model editor.
Components
WINDEVWEBDEV - Server codeReports and Queries wd230hf.dll
Windows Mobile wp230hf.dll
Java wd230java.jar
Linux wd230hf.so
Android wd230android.jar
Minimum required version
  • Version 9
This page is also available for…
Comments
Click [Add] to post a comment