PC SOFT

ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Home | Sign in | English EN
This content has been translated automatically. Click here to view the French version.
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac CatalystUniversal Windows 10 App
Others
Stored procedures
FileToArray (Function)
In french: FichierVersTableau
Fills an array of classes or structures with the content of an HFSQL data file or query. The values of members of instances of structures or classes are filled with the values of items of records found in the data file or in the query.
Versions 18 and later
Universal Windows 10 App This function is now available in Windows Store apps mode.
iPhone/iPad This function is now available for iPhone/iPad applications.
New in version 18
Universal Windows 10 App This function is now available in Windows Store apps mode.
iPhone/iPad This function is now available for iPhone/iPad applications.
Universal Windows 10 App This function is now available in Windows Store apps mode.
iPhone/iPad This function is now available for iPhone/iPad applications.
Remark: From version 19, HFSQL is the new name of HyperFileSQL.
Versions 21 and later
Apple Watch This function is now available in Apple Watch mode.
Universal Windows 10 App This function is now available in Universal Windows 10 App mode.
New in version 21
Apple Watch This function is now available in Apple Watch mode.
Universal Windows 10 App This function is now available in Universal Windows 10 App mode.
Apple Watch This function is now available in Apple Watch mode.
Universal Windows 10 App This function is now available in Universal Windows 10 App mode.
Versions 23 and later
Android Widget This function is now available in Android widget mode.
Android This function is now available for Android applications.
New in version 23
Android Widget This function is now available in Android widget mode.
Android This function is now available for Android applications.
Android Widget This function is now available in Android widget mode.
Android This function is now available for Android applications.
Example
// Déclaration d'une classe MesContacts
MesContacts is Class
NomDeFamille is string
Prénom is string
AdresseEmail is string
END
 
// Chargement des enregistrement d'un fichier de données Contacts.fic
// dans un tableau d'objet de la classe MesContacts
tabContact is array of MesContacts
 
HOpen(Contacts)
FileToArray(tabContact, Contacts)
Syntax
FileToArray(<Array> [, <Data file> [, <Search key>]])
<Array>: Array of structures or objects
Name of one-dimensional array into which the elements found in the data file or in the query will be added. This array must be allocated in a structure or class type.
<Data file>: Character string
Name of the HFSQL data file or query used.
<Search key>: Character string
Versions 16 and later
Name of search item used. This parameter is used when a filter is defined by HFilter. This parameter corresponds to the optimal search key to use, returned by HFilter.
New in version 16
Name of search item used. This parameter is used when a filter is defined by HFilter. This parameter corresponds to the optimal search key to use, returned by HFilter.
Name of search item used. This parameter is used when a filter is defined by HFilter. This parameter corresponds to the optimal search key to use, returned by HFilter.
Remarks
  • The array is entirely cleared by FileToArray.
  • The automatic arrays are automatically resized according to the requirements.
  • The file browse is performed by respecting the current filter on the data file.
  • The position and the values of the current record are not modified by FileToArray.
  • For each record found in the data file or in the query:
    • for each member of structure or class with the same name, or same "mapping" attribute, as a file item, the item value is copied into the member value.
    • if a structure or class member has no item with the same name in the data file, its value is not modified.
    • if an item of data file has no member with the same name in the class, no copy of value will be performed.
  • Caution: The FileToArray function is blocking for all threads.
Component: wd270vm.dll
Minimum version required
  • Version 15
This page is also available for…
Comments
Click [Add] to post a comment