ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Help / WLanguage / Managing databases / HFSQL / HFSQL Client/Server functions
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac CatalystUniversal Windows 10 App
Others
Stored procedures
HInfoLock (Function)
In french: HInfoBlocage
HFSQL Client/ServerAvailable only with this kind of connection
Returns information about the lock set on a data file, on one or all the records in a data file.
Example
LockList is string
// Lists all the locks of the Customer data file
LockList = HInfoLock(Customer)
// Lists all the locks set on the data files of CSConnection
LockList = HInfoLock(CSConnection)
// Lists all the locks set on the Customer.fic data file of CSConnection
LockList = HInfoLock(CSConnection, ".\customer.fic")
Syntax

Information about the locks set on a data file identified by its name Hide the details

<Result> = HInfoLock(<Data file> [, <Record number>])
<Result>: Character string
  • Empty string ("") if there is no lock or if the data file used is not a HFSQL Client/Server data file.
  • Information about the lock. This information is separated by TAB characters and it has the following format:
    <Physical name of the data file relative to the database> + TAB +
    <Record number> + TAB +
    <User> + TAB + <Name of client computer> + TAB +
    <IP address of client computer> + TAB + <Name of client application> + TAB +
    <Type of lock> + TAB + <Date of lock implementation> + TAB +
    <Number of seconds since start of lock> + CR
    • <Record number> is set to -1 if the lock was set on the data file.
    • The <Type of lock> parameter can correspond to:
      • W: Lock in write mode.
      • RW: Lock in read/write.
      • W-T: Lock in write mode set by a transaction.
      • RW-T: Lock in read/write set by a transaction.
    • <Start date of lock> has the following format: YYYYMMDDHHmmSS. This date is in UTC format (Universal Time Coordinated).
<Data file>: Character string
Name of the data file used.
If this parameter is an empty string (""), HInfoLock manipulates the last data file used by the last HFSQL function (function starting with "H").
<Record number>: Optional integer
Number of the record for which the lock information is requested.
If this parameter is not specified, HInfoLock lists all the locks of the data file.

Information about the locks set on a data file identified by its connection Hide the details

<Result> = HInfoLock(<Connection> [, <Data file path>] [, <Record number>])
<Result>: Character string
Information about the lock. This information is separated by TAB characters and it has the following format:
<Physical name of file relative to the database> + TAB + <Record number> +
TAB + <User> + TAB + <Name of client computer> + TAB +
<IP address of client computer> + TAB + <Name of client application> +
TAB + <Type of lock> + TAB + <Start date of lock> + TAB +
<Nb of seconds since start of lock> + CR
  • <Record number> is set to -1 if the lock was set on the data file.
  • The <Type of lock> parameter can correspond to:
    • W: Lock in write mode.
    • W-T: Lock in write mode set by a transaction.
    • RW: Lock in read/write.
    • RW-T: Lock in read/write set by a transaction.
  • <Start date of lock> has the following format: YYYYMMDDHHmmSS.
<Connection>: Character string or Connection variable
Connection for which the lock information is requested. This connection corresponds to: If this parameter is not a connection name, HInfoLock considers that it corresponds to the name of a data file.
<Data file path>: Optional character string
Full path of the data file, relative to the database defined by <Connection>.
If the <Connection> parameter corresponds to the logical name of a data file, it is ignored.
If this parameter is not specified, all the locks set on all the data files of the database are returned.
<Record number>: Optional integer
Number of the record for which the lock information is requested.
If this parameter is not specified, HInfoLock lists all the locks of the data file.
Component: wd290hf.dll
Minimum version required
  • Version 9
This page is also available for…
Comments
Click [Add] to post a comment

Last update: 05/26/2022

Send a report | Local help