ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Help / WLanguage / Managing databases / HFSQL / HFSQL functions
  • How to describe a data file through programming?
  • List of HFSQL properties used to describe a data file through programming
  • Types of data files that can be described with the <Source>.DescribeFile function
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
<Source>.DescribeFile (Function)
In french: <Source>.DécritFichier
ODBCNot available with this kind of connection
Describes a data file through programming.
After the call to <Source>.DescribeFile:
  • the data file can be used like any other file described in the analysis.
  • the description of the data file cannot be modified anymore.
  • the description variable of the data file is reinitialized. A new description of data file can be performed.
To cancel the description of a data file through programming, use <Source>.CancelDeclaration.
Example
AFileDescription is File Description
AnItem is Item Description
dsSource is Data Source
 
// Describe the "CUSTOMER" data file
AFileDescription.Name = "CUSTOMER"
AFileDescription.Type = hFileNormal
AFileDescription.FicCryptMethod = hEncryptionStandard
 
// Description of the "LASTNAME" item
AnItem.Name = "LASTNAME"
AnItem.Type = hItemText
AnItem.Size = 40
AnItem.KeyType = hUniqueKey
HDescribeItem(AFileDescription, AnItem)
 
// Describe the "FIRSTNAME" item
AnItem.Name = "FIRSTNAME"
AnItem.Type = hItemText
AnItem.Size = 40
HDescribeItem(AFileDescription, AnItem)
 
// Validate the data file description
dsSource.DescribeFile(AFileDescription)
 
HCreation(dsSource)
Syntax

Describing a data file through programming using a data source Hide the details

<Result> = <Data source>.DescribeFile(<Data file>)
<Result>: Boolean
  • True if the description of the data file is valid and if it can be used,
  • False if a problem occurs. HErrorInfo is used to identify the error.
<Data source>: Data Source variable
Name of the Data source variable associated with the data file.
<Data file>: File Description variable
Name of the File Description variable (see the Notes paragraph) used to describe the data file. The name of the data file will be defined with the Name property.
Remarks

How to describe a data file through programming?

To describe a data file through programming, you must:
  1. Declare a variable of type Data source.
  2. Use the File Description, Item Description, Link description and FullTextIndex Description variables (if necessary).
  3. Describe the characteristics of the data file, items, links and full-text indexes (if necessary) via the HFSQL properties.
  4. Define the description of items with HDescribeItem.
  5. Define the description of full-text indexes with HDescribeFullTextIndex.
  6. Associate the data file description with the data source (<Source>.DescribeFile, syntax 2) and links if necessary (HDescribeLink).
Remark: This solution allows associating the data file described to a data source. In this case, when this variable is deleted, the data file will also be deleted.
Caution: To use this syntax, you must use an "automatic" data source. For more details, see Project description: Compilation tab.

List of HFSQL properties used to describe a data file through programming

The following properties are available in read/write mode.
MmoPackMethodThe MmoPackMethod property is used to set the compression mode of the MMO file (containing text and binary memos) associated with the data file.
FicCryptMethodThe FicCryptMethod property is used to set the encryption method of a data file.
MmoCryptMethodThe MmoCryptMethod property is used to set the encryption method of the memo file (.MMO) associated with the data file.
NdxCryptMethodThe NdxCryptMethod property is used to configure the encryption method for the index (.NDX) file associated with the data file.
CtAccessThe CtAccess property is used to set the type of access to the data file when connecting to a specific table via OLE DB.
CtDescribedAccessThe CtDescribedAccess property is used to set the type of access to the data file when connecting to a specific table via OLE DB.
CtDatabaseThe CtDatabase property is used to set the OLE DB data source when connecting to a specific table via OLE DB.
CtDescribedDatabaseThe CtDescribedDatabase property is used to set the OLE DB data source when connecting to a specific table via OLE DB.
CtDescribedCaptionThe CtDescribedCaption property is used to get and set the caption of the connection to the OLE DB data source.
CtDescribedPasswordThe CtDescribedPassword property allows you to set the password used to open the data file in an OLE DB connection (file defined in the code only).
CtOLEDBProviderThe CtOLEDBProvider property is used to get and set the name of the OLE DB provider (also called OLE DB server).
CtDescribedOLEDBProviderThe CtDescribedOLEDBProvider property is used to get and set the name of the OLE DB provider (also called OLE DB server).
CtUserNameThe CtUserName property is used to set the username that will be used when connecting to a specific table via OLE DB.
CtDescribedUserNameThe CtDescribedUserName property is used to set the username that will be used when connecting to a specific table via OLE DB.
FormatThe Format property is used to define the data format of a data file.
HugeFileThe HugeFile property is used to configure the maximum size of a data file.
LogMethodThe LogMethod property is used to:
  • find out the log mode used for a data file (file defined in the data model editor or through programming).
  • define the log mode used for a data file (when the file is described through programming).
WDD55PasswordThe WDD55Password property is used to specify the password of the 5.5 analysis that contains a Hyper File 5.5 data file used in an HFSQL Classic analysis.
NameThe Name property is used to get:
  • the name of the font associated with a Font variable.
  • the name of a control, report or report block.
  • the name of a control, group of controls or window.
  • the name of a control, group of controls or page.
Name55The Name55 property is used to manipulate the logical name of a Hyper File 5.5 data file that has not been migrated and is located in a WINDEV 19 analysis.
DescribedNameThe DescribedName property is used to handle the logical name of HFSQL data files (ignoring possible changes made by <Source>.Alias).
PhysicalNameThe PhysicalName property is used to manage the physical name of HFSQL data files.
DescribedPhysicalNameThe DescribedPhysicalName property is used to manage the physical name of HFSQL data files.
DirectoryThe Directory property is used to manage the physical directory of HFSQL files.
DescribedDirectoryThe DescribedDirectory property is used to manage the physical directory of HFSQL files.
LogDirectoryThe LogDirectory property is used to manage the directory of the log file described in the analysis.
TextItemCompletedThe TextItemCompleted property is used to manage text items in an HFSQL data file.
SecureThe Secure property is used to configure the security level of data file encryption.
TypeThe Type property is used to get:
  • the type of element described through programming (file or item description) or not (file or item defined in the data model editor, view or query).
  • the type of object.
  • the type of value stored in a variant.
WDD55WDD55 is used to:
  • Find out the name and full path of the WDD file in Hyper File 5.5 format.
  • Define the name and full path of the WDD file in Hyper File 5.5 format.

Types of data files that can be described with the <Source>.DescribeFile function

The Type property specifies the type of data file to be created.
The following types can be created with <Source>.DescribeFile:
hFileAS400AS400 file
hFileNormalStandard file
hFileOLEDBOLE DB file
hFileOracleOracle file
hFileSQLAzureSQL Azure file
hFileSQLServerSQL Server file
hFileSybaseSybase file
hFileXBasexBase file
Business / UI classification: Business Logic
Component: wd270hf.dll
Minimum version required
  • Version 25
This page is also available for…
Comments
Click [Add] to post a comment

Last update: 08/31/2023

Send a report | Local help