PC SOFT

WINDEVWEBDEV AND WINDEV MOBILE
ONLINE HELP

Home | Sign in | English UK
New WINDEV, WEBDEV, WINDEV Mobile 25 feature!
  • Locks set by <Source>.NoModif
  • Various
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
<Source>.NoModif (Function)
In french: <Source>.InterditModif
ODBCNot available with this kind of connection
Forbids all the modifications on a data file (for all the programs, including the one that requested the no-modification policy). The records can be accessed in read-only.
WEBDEV - Server code The restriction is performed for all the sessions and other programs (developed with WEBDEV), including the session that requested the restriction.
Windows Mobile This function can be used with HFSQL Client/Server data files or with data files handled by Native Connectors. This function is not available for HFSQL Mobile.
Remark: From version 19, HFSQL is the new name of HyperFileSQL.
Example
Invoice.NoModif()
// Process...
Invoice.EndNoModif()
Syntax
<Result> = <Source>.NoModif()
<Result>: Boolean
  • True if no problem occurred,
  • False otherwise. HError returns more details about the problem.
If the data file is still locked after H.NbRetry attempts, HErrorLock returns True (the H.Locked variable is set to True).
If the data file was locked, HErrorLock returns False.
<Source>: Type corresponding to the specified source
Name of data file used.
Remarks

Locks set by <Source>.NoModif

<Source>.NoModif can lock in write mode a file already locked by another program (with <Source>.NoModif). Therefore, several programs can forbid the modifications on the same data file at the same time. A locking read function run after <Source>.NoModif in the same program reads the record without locking it.
<Source>.NoModif cannot lock a data file already locked in read/write by another program.
Reminder: the data file cannot be locked by <Source>.NoModif only if the data file is locked in read/write by another program.
Remarks:
  • In single-user mode (<Source>.Mode), <Source>.NoModif is equivalent to <Source>.Open (the data files are locked in read/write as soon as they are opened).
  • You have the ability to lock a data file whose records are locked by another application.

Various

  • The maximum number of programs that can request the no-modification policy on a data file depends on the size of a record in the data file. It can be calculated as follows:
    MaxNbSessionsOrPrograms = RecordSize - 20
  • This function is not available when accessing a database via Remote Access.
Component : wd250hf.dll
Minimum version required
  • Version 25
This page is also available for…
Comments
Click [Add] to post a comment