ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Help / WLanguage / Managing databases / HFSQL / HFSQL Client/Server functions
WINDEV
WindowsLinuxJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac Catalyst
Others
Stored procedures
<Source>.ChangePassword (Function)
In french: <Source>.ChangeMotDePasse
HFSQL ClassicHFSQL Client/ServerAvailable only with these kinds of connection
Changes the password of an HFSQL Classic or HFSQL Client/Server data file. Applications using the old password will no longer be able to access this data file: a password error will be displayed..
Caution: This is an advanced function. It must be used with great care because it can trigger errors in the client applications.
Example
// Former password
HPass("*", "Password")
// Modify the password
Customer.ChangePassword("NewPassword")
// Création d'un fichier de données avec un mot de passe
FichierA.MotDePasse("TEST")
FichierA.Création()

// Ajout de données
FichierA.RubriqueA = "Test 1"
FichierA.Ajoute()

// Lecture des données
FichierA.LitPremier()
Info(FichierA.RubriqueA)

// Changement du mot de passe
Info("Maintenant, changement de mot de passe ...")
FichierA.ChangeMotDePasse("NV_Test")
Info("Mot de passe changé, relecture du premier enregistrement")

// Relecture des données
FichierA.LitPremier()
Info(FichierA.RubriqueA)

// Gestion des erreurs
CASE ERROR:
	Error(HErrorInfo())
	RETURN
Syntax
<Result> = <Source>.ChangePassword(<New password>)
<Result>: Boolean
  • True if the password was modified,
  • False otherwise. HError is used to identify the error.
<Source>: Type corresponding to the specified source
Name of HFSQL data file (defined in the analysis) to use.
<New password>: Character string or Secret string
New password that will be used for the data file.
New in version 2025
Secret strings: If you use the secret string vault, the type of secret string used for this parameter must be "ANSI or Unicode string".
To learn more about secret strings and how to use the vault, see Secret string vault.
Remarks
  • If the data file is already password protected, this password must be specified with <Source>.Password before using <Source>.ChangePassword.
  • To modify the password of a data file, you must have the rights to perform an automatic modification (hRightsAutoModif constant). These rights can be defined by <Connection variable>.ModifyFileRights.
  • This function starts an automatic modification of the data file. If the data file was encrypted with a different password, it will be entirely re-encrypted with the new password. This operation can take quite a long time.
Component: wd300hf.dll
Minimum version required
  • Version 25
This page is also available for…
Comments
Click [Add] to post a comment

Last update: 05/14/2025

Send a report | Local help