PC SOFT

ONLINE HELP
FOR WINDEV, WEBDEV AND WINDEV MOBILE

Home | Sign in | English US
  • Data File source
  • Query source
  • Array source
  • No data source
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
A data source associated with a control is used to easily fill the control content without programming (or with very little programming). Different types of data sources are available:
Data File source
If a data file is used as data source for a control, the control is linked to a data file belonging to the analysis.
For example, the columns found in the Table control, List Box control, Combo Box control or the attributes of the Looper control are linked to a file item.
This type of fill requires no code: the data file is automatically browsed in the direction corresponding to the selected search key.
Two types of accesses are available:
  • Direct access to the data file: no limit regarding the volume of data (number of records). The display is performed by pagination, only the records corresponding to the rows displayed in the controls are read.
  • Loaded in memory: the maximum number of rows must be specified in order to limit the memory occupancy. The load time in memory can be quite long if the number of rows exceeds 100 000.
Specific features of Table control:
  • Only the columns linked to key items in the data file can be sorted and include a filter,
  • No programming.
For more details, see:
Query source
Two methods can be used to associate a query as data source:
  • Query described in the query editor then association of the query (like for a data file),
  • Embedded query, the query is created when creating the control. In this case, the query cannot be used in another control.
The columns found in the Table control, List Box control, Combo Box control or the attributes of the Looper control are linked to a query item.
This type of fill requires no code, the query is automatically browsed. We advise you to keep the sort in automatic mode as the data was already sorted in the query (faster). You have the abiliyt to choose another sort criterion whose process is longer: the upload.
For a query with parameters, the initialization code of the control must be used to initialize the values of different parameters.
Fill method:
  • If you choose a direct access to the data file, there is no limit reagarding the volume of data that can be loaded (number of records). The display is performed by pagination, only the records corresponding to the rows displayed in the controls are read.
  • If you choose a load in memory, the maximum number of rows must be specified in order to limit the memory occupancy. The load time in memory can be quite long if the number of rows exceeds 100 000. In this case, we advise you to include selection conditions in the query to avoid a huge load.
Useful information about the Table control:
  • All the columns can be sorted and they all include a filter.
  • No programming.
Array source
An Array defines an Array variable. The Array can be:
  • simple: string, date, numeric, etc.
  • based on a structure. In this case, the structure is similar to the structure of a file record.
    The Array must be filled by programming beforehand.
    The data can come from:
  • a file,
  • several data files,
  • a query.
    The variable of the Array control must be global to the project, to the window or to the page in order to be associated with the control.
    Like for a data file or a query, the columns found in the Table control, in the List Box control, in the Combo Box control or the Attributes of the Looper control will be linked to members of the Array structure.
    This type of fill requires no code, the Array is automatically browsed from the first element to the last one (depending on how the Array was sorted).
    Useful information for the Table control:
  • All the columns can be sorted and they all include a filter.
  • Very little programming.
No data source
In this mode, the control is not linked to a data source. The fill operation must be programmed by browsing the data file, the query or the Array variable with the WLanguage functions:
  • HREAD, ... FOR EACH ... for the data files or the queries,
  • FOR ... , FOR EACH ELEMENT OF... for the Arrays.
    You must call the WLanguage functions used to write into the corresponding control:
  • Table control: TableAdd, TableAddLine, ...
  • List Box control: ListAdd, ...
  • Combo Box control: ListAdd, ...
  • Looper control: LooperAdd, LooperAddLine, ...
This type of fill by programming allows the developer to control everything. Therefore, a good knowledge of WLanguage functions for managing the data files, queries, arrays, structures is required.
Minimum required version
  • Version 9
This page is also available for…
Comments
Click [Add] to post a comment