|
|
|
|
<Source>.ChangePassword (Function) In french: <Source>.ChangeMotDePasse
Available only with these kinds of connection
Changes the password of an HFSQL Classic or HFSQL Client/Server data file. The applications that use the former password will no longer be able to access this data file: a password error will be displayed. Caution: This function is an advanced function. It must be used with great care because it can trigger errors in the client applications.
// Former password HPass("*", "Password") // Modify the password Customer.ChangePassword("NewPassword")
// Create a data file with password FileA.Password("TEST") FileA.Creation() Â // Add data FileA.ItemA = "Test 1" FileA.Add() Â // Read data FileA.ReadFirst() Info(FileA.ItemA) Â // Change the password Info("Changing the password...") FileA.ChangePassword("NW_Test") Info("Password changed, the first record is read again") Â // Read data again FileA.ReadFirst() Info(FileA.ItemA) Â // Manage the errors 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 New password that will be used for the data file. 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.
This page is also available for…
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|