PC SOFT

ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Home | Sign in | English EN

  • How to describe a data file by programming?
  • List of HFSQL properties used to describe a data file by 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/iPadApple WatchUniversal Windows 10 AppWindows Mobile
Others
Stored procedures
Describes a data file by 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 by programming, use <Source>.CancelDeclaration.
Versions 21 and later
Universal Windows 10 App This function is now available in Universal Windows 10 App mode.
New in version 21
Universal Windows 10 App This function is now available in Universal Windows 10 App mode.
Universal Windows 10 App This function is now available in Universal Windows 10 App mode.
Remark: From version 19, HFSQL is the new name of HyperFileSQL.
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 = hCryptStandard
 
// HEX@ of the Item "NOM".
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 by 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 occurred. 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 Variable of type File description (see paragraph Notes) to describe the data file. The name of the data file will be defined by the Property nom.
Remarks

How to describe a data file by programming?

To describe a data file by programming, you must:
  1. Declare an 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 by programming

The following properties are available in read/write mode.
CtAccessThe Property CxAccess allows you to manage the type of data file access when connecting OLE DB to a specific table.
CtDatabaseThe Property CxDatabase is used to manage the OLE DB data source when connecting OLE DB to a specific table.
CtDescribedAccessThe Property CxAccèsDécrit is used to manage the type of access to the data file when connecting OLE DB to a specific table.
CtDescribedCaptionCtDescribedCaption is used to manage the caption of the connection to the OLE DB data source.
CtDescribedDatabaseCtDescribedDatabase is used to manage the OLE DB data source during the OLE DB connection to a specific table.
CtDescribedOLEDBProviderCtDescribedOLEDBProvider is used to manage the name of the OLE DB provider (also called OLE DB server).
CtDescribedPasswordCtDescribedPassword enables you to define the password used to open the file during an OLE DB connection (file defined by programming only).
CtDescribedUserNameThe CxUserDescript property is used to set the user name used in the Connection OLE DB to a specific table.
CtOLEDBProviderCtOLEDBProvider is used to manage the name of the OLE DB provider (also called OLE DB server).
CtUserNameThe CxUser property is used to set the user name used in the Connection OLE DB to a specific table.
DescribedDirectoryThe Property WrittenDirectory allows you to manage the physical directory of HFSQL files.
DescribedNameThe Property DescribedName is used to manage the logical name of HFSQL files.
DescribedPhysicalNameThe Property PhysicalName is used to manage the physical name of HFSQL files.
DirectoryThe Property Directory allows you to manage the physical directory of HFSQL files.
FicCryptMethodFicCryptMethod is used to configure the encryption mode of the data file.
FormatFormat is used to configure the format of the data in the data file.
HugeFileHugeFile is used to configure the maximum size of a data file.
LogDirectoryThe Property DirectoryJournal is used to manage the directory of the log file described in the analysis.
LogMethodThe Property Logging allows you to:
  • find out the log mode used for a data file (file defined in the data model editor or by programming).
  • define the log mode used for a data file (when the file is described by programming).
MmoCryptMethodThe Property EncryptionMmo allows you to set the encryption mode of the memo file (.MMO extension) associated to the data file.
MmoPackMethodThe Property CompressionMmo is used to set the compression mode of the MMO file (containing binary and text memos) associated to the data file.
NameThe Property Name allows you to know:
  • 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 Property Nom55 allows to manage the logical name of a data file in Hyper File 5.5 format not migrated and present in an analysis in WINDEV 19 format.
NdxCryptMethodThe NdxCryptMethod property is used to configure the encryption method for the index (.NDX) file associated with the data file.
PhysicalNameThe Property PhysicalName allows to manage the physical name of HFSQL files.
SecureThe Property Secured allows you to set the security level of file encryption.
TextItemCompletedThe Property CompleteTextField allows you to set up the management of text fields in an HFSQL file.
TypeThe Property Type allows to know:
  • the type of element described by 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.
WDD55PasswordWDD55Password is used to specify the password of the analysis in 5.5 format during the description by programming of a file in Hyper File 5.5 format in an analysis in Hyper File Classic format.

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

Type is used to specify the type of data file to create.
The following types can be created by <Source>.DescribeFile:
hFileAS400AS400 file
hFileNormalStandard file
hFileOLEDBOLE DB file
hFileOracleOracle file
Versions 16 and later
hFileSQLAzure
New in version 16
hFileSQLAzure
hFileSQLAzure
SQL Azure file
hFileSQLServerSQL Server file
hFileSybaseSybase file
hFileXBasexBase file
Business / UI classification: Business Logic
Component: wd260hf.dll
Minimum version required
  • Version 25
This page is also available for…
Comments
Click [Add] to post a comment