ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Attention : This is version 26 of this documentation page. This feature may have been changed or removed in a higher version.
Help / WLanguage / Managing databases / HFSQL functions / Compatible Hyper File functions
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
HAssign (Function)
In french: HAssigne
HFSQLAvailable only with this kind of connection
Warning
HAssgin is kept for backward compatibility (it will still be supported in the forthcoming version).
In version 8, HAssign was replaced by HChangeDir.
The documentation about HAssignKey available in WINDEV 5.5 is as follows.
 
Purpose
Modify the access path of a data file.
Syntax
HAssign(<File_Name>, <AccessPath>)
  • <FileName> is a character string containing the logical name of the data file.
  • <AccessPath> is the access path to the data file. This string contains up to 260 characters (uppercase and/or lowercase characters) containing the drive and the name of the directory of the data file. It does not contain the name of the data file.
Details
HAssign modifies the access path to the data file on disk during the next call to a WINDEV function. The file will be opened in the specified path.
H.Dir contains the new path.
If <Access_Path>="?" (HAssign(<File_Name>,"?")), the file will be opened in the current directory.
If the file is opened before the call to HAssign, it is automatically closed.
Notes
  • In a program that is using HAssign and HCreation, the .REP must be managed in order for the data files to be updated after a modification of the structure of the files. By default, HSetDirOn is called.
  • HAssign must be used when the path and/or the name of the file on disk differ from the ones described in the analysis.
  • The logical name is the file name defined during the description of the file. The physical access path of the file is the path used to access the file on the hard disk.
  • HAssign cannot be used with the xBase files.
  • If the access path does not exist on disk, the error 24 is returned when the file is opened.
  • The path may contain (as in DOS) the . (to identify the current directory) and .. (to identify the previous directory).
  • If no directory is specified in <Access_Path>, it corresponds to the current directory.
  • HAssign is used to associate a directory with a file. To substitute a directory for another one, use HSubstDir.
    Caution: the change of directory performed by HSubstDir applies to the directory defined by HChangeDir.
Minimum version required
  • Version 9
This page is also available for…
Comments
Click [Add] to post a comment

Last update: 09/17/2020

Send a report | Local help