PC SOFT

ONLINE HELP
FOR WINDEV, WEBDEV AND WINDEV MOBILE

Home | Sign in | English US

  • What is a view?
  • Functions for managing the views
  • The WLanguage functions
  • Use
  • Handling a view
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
The HFSQL views
HFSQLHFSQL Client/ServerAvailable only with these kinds of connection
Warning
From version 20, the SQL views et les materialized views are available. This help page is kept for backward compatibility.
What is a view?
A HFSQL view corresponds to a "memory image" of a HFSQL data file.
A view is stored in memory, which insulates it from the modifications made to the associated data file.
Once created, a view can be handled like any HFSQL 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.
Functions for managing the views

The WLanguage functions

The following functions are used to handle the HFSQL views:
Versions 09 and later
HCreateView
New in version 09
HCreateView
HCreateView
Creates a HFSQL view.
This function is using the former mechanism of views.
Versions 09 and later
HCreateView_55
New in version 09
HCreateView_55
HCreateView_55
Create a view on a Hyper File file (WINDEV 5.5 format, function kept for backward compatibility).
Versions 09 and later
HDeleteView
New in version 09
HDeleteView
HDeleteView
Destroys a view that was created beforehand. This function is using the former mechanism of views.
Versions 09 and later
HExecuteView
New in version 09
HExecuteView
HExecuteView
Runs a view that was created beforehand (can be used to refresh the view data for example). This function is using the former mechanism of views.
Versions 09 and later
HMergeView
New in version 09
HMergeView
HMergeView
Creates a HFSQL from two views created beforehand (HCreateView). This function is using the former mechanism of views.
Versions 09 and later
HSortView
New in version 09
HSortView
HSortView
Sorts a HFSQL view by creating an index on a view item. This function is using the former mechanism of views.
Versions 09 and later
HViewToFile
New in version 09
HViewToFile
HViewToFile
Saves the modifications performed in a HFSQL view (by HModify, HDelete or HCross) in the corresponding data file. This function is using the former mechanism of views.
Use

Handling a view

To handle a view on a HFSQL file, the following operations must be performed:
  1. Creating the view with HCreateView (while specifying the selection conditions if necessary).
  2. The view is automatically executed. The records of the view can be handled, browsed, ... by the HFSQL management functions. The name of the file specified in the functions will correspond to the name of the view.
  3. Available operations specific to views:
    • If the records found in the base file of the view have been modified, you have the ability to refresh the view by re-running it (HExecuteView). You will have the ability to specify new selection criteria.
    • Modify the sort order of the records found in the view. By default, the records found in a view are sorted in the same order as the one used in the corresponding HFSQL file. However, this order can be modified by HSortView. If the sort is applied to several items of the view, the sort is applied according to the first sort item, then according to the second one, etc.
    • Apply the operations performed on the view records (additions, modifications, deletions, ...) to the base file of the view (HViewToFile). Caution: this operation can be performed only if the records have been locked in the file when creating the view.
    • Merging several views (HMergeView). Merging two views allows you to create a new view containing the data found in the "source" views. Then, this view can be handled like a standard view. HMergeView proposes several merge modes:
      • Union of all the rows found in the first view and in the second view.
        Caution: The structure of views must be identical.
      • Union of all the non-common rows found in the first view and in the second view.
        Caution: The structure of views must be identical.
      • Selection of the rows common to the first view and to the second view.
      • Selection of the rows found in the first view without the common rows found in the second view.
      • Merging the two views with interruption. The creation of the view can be interrupted by pressing the [ESC] key.
      • Join between the first view and the second view. The items found in the second view that do not exist in the first view (and conversely) are added into the destination view
  4. Deleting the view (HDeleteView). The deletion of a view consists in destroying everything that relates to the view, including its description. During this deletion, the records locked by the view (if they exist) are unlocked.
Minimum required version
  • Version 9
This page is also available for…
Comments
Click [Add] to post a comment