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.
  • 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 HDescribeFile function
  • Syntax 2: Description of data file (compatibility with 5.5)
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
Describes a data file through programming.
After the call to HDescribeFile:
  • 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 HCancelDeclaration.
Versions 17 and later
iPhone/iPad This function is now available for iPhone/iPad applications.
New in version 17
iPhone/iPad This function is now available for iPhone/iPad applications.
iPhone/iPad This function is now available for iPhone/iPad applications.
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
// Exemple utilisant la syntaxe 1
UnFichier is File Description
UneRubrique is Item Description
Client is Data Source = "Client"
 
// Description du fichier de données "Client"
UnFichier.Name = "Client"
UnFichier.Type = hFileNormal
UnFichier.FicCryptMethod = hEncryptionStandard
 
// Description de la rubrique "Nom"
UneRubrique.Name = "NOM"
UneRubrique.Type = hItemText
UneRubrique.Size = 40
UneRubrique.KeyType = hUniqueKey
HDescribeItem(UnFichier, UneRubrique)
 
// Description de la rubrique "Prénom"
UneRubrique.Name = "PRENOM"
UneRubrique.Type = hItemText
UneRubrique.Size = 40
HDescribeItem(UnFichier, UneRubrique)
 
// Valide la description du fichier de données
HDescribeFile(UnFichier)
...
 
// Création du fichier de données Client (reconnu car déclaré comme source de données)
HCréation(Client)
 
// Création d'un enregistrement
Client.Nom = "Dupont"
Client.Prénom = "André"
HAdd(Client)
// Exemple utilisant la syntaxe 2
UneDescriptionFichier is File Description
UneRubrique is Item Description
sdSource is Data Source
 
// Description du fichier de données "CLIENT"
UneDescriptionFichier.Name = "CLIENT"
UneDescriptionFichier.Type = hFileNormal
UneDescriptionFichier.FicCryptMethod = hEncryptionStandard
 
// Description de la rubrique "NOM"
UneRubrique.Name = "NOM"
UneRubrique.Type = hItemText
UneRubrique.Size = 40
UneRubrique.KeyType = hUniqueKey
HDescribeItem(UneDescriptionFichier, UneRubrique)
 
// Description de la rubrique "PRENOM"
UneRubrique.Name = "PRENOM"
UneRubrique.Type = hItemText
UneRubrique.Size = 40
HDescribeItem(UneDescriptionFichier, UneRubrique)
 
// Valide la description du fichier de données
HDescribeFile(sdSource, UneDescriptionFichier)
 
HCréation(sdSource)
Syntax

Describing a data file through programming Hide the details

<Result> = HDescribeFile(<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 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.

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

<Result> = HDescribeFile(<Data source> , <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.
WINDEVWEBDEV - Server codeReports and QueriesWindowsUser code (UMC)AjaxHyper File 5.5

Describing a data file in Hyper File 5.5 format through programming (backward compatibility only) Hide the details

<Result> = HDescribeFile(<Data file> , <Abbreviation> [, <Access path>])
<Result>: Boolean
  • True if the operation was performed,
  • False if a problem occurred. HErrorInfo is used to identify the error.
<Data file>: Character string
Name of the temporary data file to create. This temporary data file is in Hyper File 5.5 format.
<Abbreviation>: 2-character string
Data file prefix.
<Access path>: Optional character string
Name of the directory or drive in which the physical data file will be created. If this parameter is not specified, the data file will be created (HCreation) in the current program directory.
Remarks

How to describe a data file through programming?

To describe a data file through programming, you must:

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

The following properties are available in read/write mode.
CtAccessThe CtAccess 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.
CtDescribedAccessThe CtDescribedAccess property is used to set the type of access to the data file 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.
CtDescribedDatabaseThe CtDescribedDatabase property is used to set the OLE DB data source when connecting to a specific table via OLE DB.
CtDescribedOLEDBProviderThe CtDescribedOLEDBProvider property is used to get and set the name of the OLE DB provider (also called OLE DB server).
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).
CtDescribedUserNameThe CtDescribedUserName property is used to set the username that will be used when connecting to a specific table via OLE DB.
CtOLEDBProviderThe CtOLEDBProvider 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.
DescribedDirectoryThe DescribedDirectory property is used to manage the physical directory of HFSQL files.
DescribedNameThe DescribedName property is used to handle the logical name of HFSQL data files (ignoring possible changes made by HAlias).
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.
FicCryptMethodThe FicCryptMethod property is used to set the encryption method of a data file.
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.
LogDirectoryThe LogDirectory property is used to manage the directory of the log file described in the analysis.
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).
MmoCryptMethodThe MmoCryptMethod property is used to set the encryption method of the memo file (.MMO) associated with the data file.
MmoPackMethodThe MmoPackMethod property is used to set the compression mode of the MMO file (containing text and binary memos) associated with the data file.
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.
NdxCryptMethodThe NdxCryptMethod property is used to configure the encryption method for the index (.NDX) file associated with the data file.
PhysicalNameThe PhysicalName property is used to manage the physical name of HFSQL data files.
SecureThe Secure property is used to configure the security level of data file encryption.
TextItemCompletedThe TextItemCompleted property is used to manage text items in an HFSQL data file.
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.
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.

Types of data files that can be described with the HDescribeFile function

Type is used to specify the type of data file to create.
The following types can be created with function HDescribeFile:
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
WINDEVWEBDEV - Server codeWindowsHyper File 5.5

Syntax 2: Description of data file (compatibility with 5.5)

This syntax is used to create some temporary data files in Hyper File 5.5 format. This syntax can only be used in an application developed with WINDEV 5.5 or WEBDEV 1.5 and migrated to WINDEV 7 (or later). To use this function:
  • the analysis in Hyper File 5.5 format must be accessible on the development computer and it must be loaded.
  • the path of the WINDEV 5.5 analysis must be specified in the characteristics of the analysis ("Details" tab).
Business / UI classification: Business Logic
Component: wd270hf.dll
Minimum version required
  • Version 9
This page is also available for…
Comments
Click [Add] to post a comment