ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

This content has been translated automatically.  Click here  to view the French version.
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 programmatically
  • Types of data files that can be described with the HDescribeFile function
  • Syntax 2: Data file description (compatibility 5.5)
WINDEV
WindowsLinuxJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac Catalyst
Others
Stored procedures
Describes a data file programmatically.
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 programmatically cancel the data file description, use HCancelDeclaration.
Example
// Example using syntax 1
AFile is File Description
AnItem is Item Description
Customer is Data Source

// Describe the "Customer" data file
AFile.Name = "Customer"
AFile.Type = hFileNormal
AFile.FicEncryption = hEncryptionStandard

// Describe the "LastName" item
AnItem.Name = "LASTNAME"
AnItem.Type = hItemText
AnItem.Size = 40
AnItem.KeyType = hUniqueKey
HDescribeItem(AFile, AnItem)

// Describe the "FirstName" item
AnItem.Name = "FIRSTNAME"
AnItem.Type = hItemText
AnItem.Size = 40
HDescribeItem(AFile, AnItem)

// Validate the data file description 
HDescribeFile(AFile)
...

// Create the data file named Customer (recognized because declared as data source)
HCreation(Customer)

// Create a record
Customer.LastName = "Smith"
Customer.FirstName = "Andrew"
HAdd(Customer)
// Example using syntax 2
AFileDescription is File Description
AnItem is Item Description
dsSource is Data Source 
 
// Describe the "CUSTOMER" data file
AFileDescription.Name = "CUSTOMER"
AFileDescription.Type = hFileNormal
AFileDescription.FicEncryption = 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
HDescribeFile(dsSource, AFileDescription)

HCreation(dsSource)
Syntax

Describing a data file programmatically 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 occurs. HErrorInfo is used to identify the error.
<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.

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 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.
WINDEVWEBDEV - Server codeReports and QueriesWindowsUser code (UMC)AjaxHyper File 5.5

Programmatically describe a data file in Hyper File 5.5 format (compatibility only) Hide the details

<Result> = HDescribeFile(<Data file> , <Abbreviation> [, <Access path>])
<Result>: Boolean
  • True if the operation was performed,
  • False if a problem occurs. 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 programmatically

The following properties are available in read/write mode.
CtAccessThe CtAccess property sets 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 gets and sets 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 gets and sets the name of the OLE DB provider (also called OLE DB server).
CtDescribedPasswordThe CtDescribedPassword property allows you to set the password used to open a data file in an OLE DB connection (only for data files defined programmatically).
CtDescribedUserNameThe CtDescribedUserName property sets the username used to connect to a specific table via OLE DB.
CtOLEDBProviderThe CtOLEDBProvider property gets and sets the name of the OLE DB provider (also called OLE DB server).
CtUserNameThe CtUserName property sets the username used to connect 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.
FicEncryptionThe FicEncryption property sets the encryption method of a data file.
FormatThe Format property is used to define the data format of a data file.
HugeFileThe HugeFile property sets the maximum possible 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).
MmoEncryptionThe MmoEncryption property sets the encryption method of the memo file (.MMO) associated with a data file.
MmoPackMethodThe MmoPackMethod property sets the compression mode of a MMO file (containing text and binary memos) associated with a 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.
NdxEncryptionThe NdxEncryption property sets the encryption method of the index file (.NDX) associated with a data file.
PhysicalNameThe PhysicalName property is used to manage the physical name of HFSQL data files.
SecureThe Secure property is used to configure the data file encryption security level.
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 (data file or item) defined programmatically or in the data model editor, view or query.
  • the type of object.
  • the type of data held in a Variant.
WDD55The WDD55 property is used to:
  • Get the name and full path of the Hyper File 5.5 WDD file.
  • Set the name and full path of the Hyper File 5.5 WDD file.
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

The Type property specifies the type of data file to be created.
The following types can be created with HDescribeFile:
hFileAS400AS400 file
hFileNormalStandard file
hFileOLEDBOLE DB file
hFileOracleOracle file
hFileSQLAzureSQL Azure file
hFileSQLServerSQL Server file
hFileSybaseSybase file
hFileXBasexBase file
WINDEVWEBDEV - Server codeWindowsHyper File 5.5

Syntax 2: Data file description (compatibility 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: wd300hf.dll
Minimum version required
  • Version 9
This page is also available for…
Comments
Click [Add] to post a comment

Last update: 11/15/2024

Send a report | Local help