PC SOFT

ONLINE HELP
FOR WINDEV, WEBDEV AND WINDEV MOBILE

Home | Sign in | English US

  • Overview
  • Several physical data files with an identical logical description
  • Several logical data files linked to a single physical data file
  • Handling the aliases by programming
  • The WLanguage functions
  • Create an alias on what?
  • Characteristics of an alias
  • Handling the alias file and its items
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
Managing aliases on the data files
HFSQLHFSQL Client/ServerAvailable only with these kinds of connection
Overview
The aliases are used to handle:
  • Several physical data files with the same description in the analysis
  • Several logical data files described in the analysis that handle the same physical data file.
Versions 17 and later
iPhone/iPad This feature is now available for the iPhone/iPad applications.
New in version 17
iPhone/iPad This feature is now available for the iPhone/iPad applications.
iPhone/iPad This feature is now available for the iPhone/iPad applications.
Note: From version 19, HFSQL is the new name of HyperFileSQL.

Several physical data files with an identical logical description

For example: You have the ability to manage at the same time:
  • The Customer2000.fic file that contains the backup of the customers for the year 2000
  • The Customer.fic file that contains the customer references for the current year
These two data files have the same logical description in the analysis: the CUSTOMER file. By default, the description of CUSTOMER file found in the analysis is linked to the Customer.fic file.
To use the Customer2000.Fic data file, you must "copy" the description of the CUSTOMER data file found in the analysis: to do so, create an alias with HAlias. The corresponding code line is as follows:
HAlias(Customer, Customer2000)
The two files will be handled the same way with the HFSQL functions.

Several logical data files linked to a single physical data file

You have the ability to perform several parallel searches on the same physical data file or a search and a filter in parallel on the data file.
Example: The Customer.Fic data file is associated with the logical file named Customer in the analysis. To filter the records found in the Customer.fic data file and to browse at the same time all the records found in this data file, you must:
  • "Copy" the description of the CUSTOMER data file into the analysis: to do so, create an alias with HAlias.
  • Associate the description of the alias with the physical data file named Customer.Fic (HChangeName).
Note: This method is used to manage several HFSQL contexts for the same physical data file.
Handling the aliases by programming

The WLanguage functions

Several functions are used to handle the aliases:
Versions 09 and later
HAlias
New in version 09
HAlias
HAlias
Creates a logical alias of data file (or query) or cancels all existing aliases.
Versions 09 and later
HCancelAlias
New in version 09
HCancelAlias
HCancelAlias
Cancels an alias that was declared beforehand by HAlias.
Other functions can intervene in the definition and use of aliases:
Versions 09 and later
HChangeDir
New in version 09
HChangeDir
HChangeDir
Modifies the access path to a data file (which means the directory where the file will be used).
Versions 09 and later
HChangeName
New in version 09
HChangeName
HChangeName
Modifies the physical name of a data file.

Create an alias on what?

You have the ability to create and handle aliases for the following elements:
  • Data file described in the analysis
  • Data file described dynamically
  • Query created in the query editor
  • HFSQL Classic view
  • Alias

Characteristics of an alias

  • Physical data file associated with an alias:
    By default, the name specified for the alias is assigned to the physical data file corresponding to the alias. To associate the alias with a physical data file of different name, you must use HChangeName and HChangeDir.
  • Password of an alias:
    By default, the password of an alias file is identical to the password of the source data file. This password can be modified by HPass. The name of the data file used in this function corresponds to the name of the alias.
  • Re-indexing:
    The alias files can be re-indexed.
  • Automatic modification of the data files:
    This operation can be applied to the alias files.

Handling the alias file and its items

  • Code editor: To avoid the "Unknown identifier" error when using an alias file and its items, we recommend that you use a data source to declare the name of the alias before using HAlias.
    For example:
    Orders2000 is Data Source
    HAlias(Orders, Orders2000)

    Caution: the Extern keyword can be used but it slows down the execution significantly.
  • Window editor or page editor: the controls and the tables cannot be directly associated with the items found in the alias files. The controls must be assigned one by one by programming.
    Note: to redefine the links of controls by programming, you have the ability to use ControlAlias or ..FileLink.
Minimum required version
  • Version 9
This page is also available for…
Comments
Click [Add] to post a comment