PC SOFT

ONLINE HELP
FOR WINDEV, WEBDEV AND WINDEV MOBILE

  • When should I use HPass?
  • Defining a password on a data file
  • Deleting the password defined on a data file
  • Managing the password (OLE DB and Native Accesses)
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
Defines the password used to create or open a data file. The password is stored and it will be used when opening or creating the data file if no password is specified.
Notes:
  • Caution: A password must be defined to perform a data encryption. The data encryption must be configured during the description of the data file in the data model editor ("Details" tab).
  • This password can also be specified in the functions for creating the data file (HCreation, HCreationIfNotFound) and for opening the data file (HOpen).
  • Encrypted files in a HFSQL connection:  Caution: The order in which the functions for connecting to a HFSQL Client/Server database are called is important. See Optimizing the connection times to the HFSQL Client/Server databases for more details.
Java Access by JDBC: This function is not available for the databases accessed by JDBC.
Versions 17 and later
WINDEV MobileiPhone/iPad This function is now available for the iPhone/iPad applications.
New in version 17
WINDEV MobileiPhone/iPad This function is now available for the iPhone/iPad applications.
WINDEV MobileiPhone/iPad This function is now available for the iPhone/iPad applications.
Versions 18 and later
WINDEV MobileAndroid Widget This function is now available in Android Widget mode.
WINDEVWINDEV MobileUniversal Windows 10 App This function is now available in Windows Store apps mode.
WINDEV MobileAndroid This function is now available for the Android applications (for the HFSQL data files).
WINDEVJava This function is now available for the Java applications.
New in version 18
WINDEV MobileAndroid Widget This function is now available in Android Widget mode.
WINDEVWINDEV MobileUniversal Windows 10 App This function is now available in Windows Store apps mode.
WINDEV MobileAndroid This function is now available for the Android applications (for the HFSQL data files).
WINDEVJava This function is now available for the Java applications.
WINDEV MobileAndroid Widget This function is now available in Android Widget mode.
WINDEVWINDEV MobileUniversal Windows 10 App This function is now available in Windows Store apps mode.
WINDEV MobileAndroid This function is now available for the Android applications (for the HFSQL data files).
WINDEVJava This function is now available for the Java applications.
Note: From version 19, HFSQL is the new name of HyperFileSQL.
Versions 21 and later
WINDEVWINDEV MobileUniversal Windows 10 App This function is now available in Universal Windows 10 App mode.
New in version 21
WINDEVWINDEV MobileUniversal Windows 10 App This function is now available in Universal Windows 10 App mode.
WINDEVWINDEV MobileUniversal Windows 10 App This function is now available in Universal Windows 10 App mode.
Example
// Open a file with password and error check
HPass(CUSTOMER, "Password")
IF HCreationIfNotFound(CUSTOMER) = False THEN
Error("HFSQL error: " + HErrorInfo())
RETURN
END
// HErrorPassword is used to find out whether the error that occurred is a password error
IF HCreationIfNotFound() = False THEN
// Details of the error
IF HErrorPassword() = True THEN
Error("Invalid password")
// Code to retry
END
END
Syntax
<Result> = HPass(<File Name> [, <Password>])
<Result>: Boolean
  • True if the password is saved,
  • False if an error occurred (insufficient memory for example). HError and HErrorInfo return more details about the problem.
<File Name>: Character string (with or without quotes)
Name of the data file that is using a password.
If this parameter corresponds to "*", the password will be used for all the data files described in the analysis.
This parameter can also correspond to the name of a group of files (or custom-folder) defined in the analysis. In this case, the password will be used for all the files of the group.
If the data file is declared by HDeclareExternal, <File Name> corresponds to the name of the file alias.
<Password>: Optional character string (with quotes)
Password associated with the data file.
If this parameter is not specified or if it corresponds to an empty string (""), no password is defined for the data file. The size of the password is not limited.
HFSQLHFSQL Client/Server The password of the HFSQL files is not sensitive to the case.
Remarks

When should I use HPass?

HPass must be called:
  • before the explicit opening or creation functions: HOpen, HCreation, HCreationIfNotFound.
  • before the HFSQL functions that access the date files and that automatically open the data files if not already done (read, search, add, ...).
Notes:
  • If a password is specified in the explicit opening or creation functions (HOpen, HCreation, HCreationIfNotFound), the password specified in HPass is ignored.
  • The password of the HFSQL files is not sensitive to the case.

Defining a password on a data file

A data file will be password protected if:
  • HPass was used before the function for creating the data file ((HCreation and HCreationIfNotFound,
  • the password was specified in the function for creating the data file.
Note: A data file can be password-protected without being encrypted (and conversely). The password is independent of data encryption. The data encryption must be configured during the description of the data file in the data model editor ("Details" tab).

Deleting the password defined on a data file

To delete a password on a data file, an automatic modification of data files must be performed.
To do so, perform a modification in the analysis (modify the size of an item for example). In this case, an automatic modification of data files will be proposed when the analysis is generated. You will be able to modify or delete the password associated with one or more data files.
If your data files are already deployed, specify that an automatic modification of data files is required when creating the setup program. The password will be deleted or modified.
Caution: don't forget to modify your code accordingly if the password defined for your data files is deleted.
WINDEVWEBDEV - Server codeOLE DBNative Accesses

Managing the password (OLE DB and Native Accesses)

The password must be specified in the parameters of the connection.
Components
WINDEVWEBDEV - Server codeReports and Queries wd220hf.dll
Windows Mobile wp220hf.dll
Java wd220java.jar
Linux wd220hf.so
Android wd220android.jar
Minimum required version
  • Version 9
This page is also available for…
Comments
Criando um HFSQL com senha e acessando o conteudo
// Create all the data files described in the analysis
// with the "PSW" password
HCreationIfNotFound("*", "Password")
// Open a file with password and error check
IF HCreationIfNotFound(CUSTOMER) = False THEN
Error("HFSQL error: " + HErrorInfo())
RETURN
END
// HErrorPassword is used to find out whether the error that occurred is a password error
IF HCreationIfNotFound() = False THEN
// Details of the error
IF HErrorPassword() = True THEN
Error("Invalid password")
// Code to retry
END
END
BOLLER
Jul. 06 2017