PC SOFT

ONLINE HELP
FOR WINDEV, WEBDEV AND WINDEV MOBILE

Home | Sign in | English US

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
Modifies the current record if it exists, otherwise adds a new record.
Versions 20 and later
WINDEVJava This function is now available for the Java applications.
Android This function is now available for the Android applications.
New in version 20
WINDEVJava This function is now available for the Java applications.
Android This function is now available for the Android applications.
WINDEVJava This function is now available for the Java applications.
Android This function is now available for the Android applications.
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
ScreenToFile(Customer)
HSave(Customer)
Syntax
<Result> = HSave([<File Name> [, <Option>]])
<Result>: Boolean
  • True if the addition or the modification was performed,
  • False if an error occurred.
<File Name>: Optional character string (with or without quotes)
Name of data file, view or query used. If this name is not specified, HSave handles the last data file used by the last function for HFSQL management (starting with the letter H).
<Option>: Optional integer constant
Used to configure:
  • the effect of addition or modification on the current browse.
  • the mode for calculating the automatic identifier. See Managing the automatic identifier during an addition for more details.
  • the lock mode of the added or modified record.
  • the management of duplicates.
  • the management of integrity.
Hyper File 5.5 This parameter is ignored.
hAffectBrowseEffect of the adidtion/modification on the browse: The addition or the modification affects the browse.
For example, HReadNext used after HSave positions on the record found after the added/modified record.
The hAffectBrowse constant has priority over the hWriteDefault constant.
hLockNo
(default value)
Mode for locking the added or modified record: No lock (even if HStartLock was used): the added or modified record will not be locked.
AndroidAndroid Widget This constant is not available.
Java Access by JDBC: This constant is not available.
hLockWriteMode for locking the added or modified record: Lock in write mode: the added or modified record will be locked in write mode. This record can be read by another application but it cannot be modified by another application. Only the current application can modify it or unlock it.
AndroidAndroid Widget This constant is not available.
Java Access by JDBC: This constant is not available.
hLockReadWriteMode for locking the added or modified record: Lock in read/write: the added or modified record will be locked in read/write. This record cannot be read or modified by another application. Only the current application can modify it, read it or unlock it.
AndroidAndroid Widget PHP This constant is not available.
Java Access by JDBC: This constant is not available.
hWriteDefault
(default value)
Effect of the adidtion or modification on the browse: The addition or the modification does not affect the current browse.
For example, HReadNext used after HSave positions on the record found after the current record before the addition or modification.
The hAffectBrowse constant has priority over the hWriteDefault constant.
hSetIdAutoMode for calculating the automatic identifier: The automatic identifier is not calculated during the addition: the identifier value will be the one stored during the addition.
The next identifier value calculated by the HFSQL engine will correspond to the greatest identifier value in the file +1.
A WLanguage error occurs if the hSetIdAuto and hForceIdAuto constants are used at the same time.
hForceIdAutoMode for calculating the automatic identifier: The automatic identifier is not calculated during the addition. The identifier corresponds to:
  • the value assigned to the item by programming (CUSTOMERID = 7 for example)
  • the default identifier value specified in the data model editor (if the data file was just opened, with no record read)
  • the identifier value found in memory (identifier value for the last record read in the data file).
Once the record is added, the next automatic identifier calculated by the HFSQL engine will be calculated while ignoring the value added by hForceIdAuto.
A WLanguage error occurs if the hSetIdAuto and hForceIdAuto constants are used at the same time.
hIgnoreDuplicatesManagement mode of duplicates: Ignores the duplicate check for this operation, even if the automatic duplicate check is enabled (HSetDuplicates).
A WLanguage error occurs if the hIgnoreDuplicates and hCheckDuplicates constants are used at the same time.
AndroidAndroid Widget This constant is not available.
Java Access by JDBC: This constant is not available.
hIgnoreIntegrityManagement mode of integrity: Ignores the integrity check for this add operation, even if the automatic integrity check is enabled (HSetIntegrity).
A WLanguage error occurs if the hIgnoreIntegrity and hCheckIntegrity constants are used at the same time.
AndroidAndroid Widget This constant is not available.
Java Access by JDBC: This constant is not available.
hRecalculateIdAutoMode for calculating the automatic identifier: The automatic record identifier will be recalculated during the write operation. This constant has priority over hForceIdAuto and hSetIdAuto.
PHP This constant is not available.
hCheckDuplicatesManagement mode of duplicates: Checks the duplicates for this operation, even if the duplicate check is disabled (HSetDuplicates).
A WLanguage error occurs if the hIgnoreDuplicates and hCheckDuplicates constants are used at the same time.
AndroidAndroid Widget This constant is not available.
Java Access by JDBC: This constant is not available.
hCheckIntegrityManagement mode of integrity: Checks the integrity of operation even if the automatic integrity check is disabled (HSetIntegrity).
A WLanguage error occurs if the hIgnoreIntegrity and hCheckIntegrity constants are used at the same time.
AndroidAndroid Widget This constant is not available.
Java Access by JDBC: This constant is not available.
Remarks
  • If ..NewRecord is set to False, HSave modifies the record in the data file (HAdd). See the documentation about HAdd for more details.
  • If ..NewRecord is set to True, HSave adds the record into the data file (HModify). See the documentation about HModify for more details.
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 20
This page is also available for…
Comments
Click [Add] to post a comment