- 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 HDescribeFile function
- Syntax 2: Description of data file (compatibility with 5.5)
HDescribeFile (Function) In french: HDécritFichier
Not available with this kind of connection
// Example using syntax 1 AFile is File Description AnItem is Item Description Customer is Data Source = "Customer" // Describe the "Customer" data file AFile..Name = "Customer" AFile..Type = hFileNormal AFile..FicCryptMethod = hCryptStandard // 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 Client Name = "Dupont" 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..FicCryptMethod = hCryptStandard // description from the "NAME" section 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 by 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 by 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. Remarks How to describe a data file by programming? To describe a data file by programming, you must: - Solution 1 (syntax 1): Direct description
- Use the File description, Item description, Link description and FullTextIndex description variables (if necessary).
- Describe the characteristics of the data file, items, links and full-text indexes (if necessary) via the HFSQL properties.
- Define the description of items with HDescribeItem.
- Define the description of full-text indexes with HDescribeFullTextIndex.
- Define the description of the data file (HDescribeFile) and links if necessary (HDescribeLink).
Versions 24 and laterSolution 2 (syntax 2): Description using a data sourceThis 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. See Project description: Compilation tab for more details. - Declare an Variable of type Data source.
- Use the File description, Item description, Link description and FullTextIndex description variables (if necessary).
- Describe the characteristics of the data file, items, links and full-text indexes (if necessary) via the HFSQL properties.
- Define the description of items with HDescribeItem.
- Define the description of full-text indexes with HDescribeFullTextIndex.
- Associate the data file description with the data source (HDescribeFile, syntax 2) and links if necessary (HDescribeLink).
New in version 24Solution 2 (syntax 2): Description using a data sourceThis 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. See Project description: Compilation tab for more details. - Declare an Variable of type Data source.
- Use the File description, Item description, Link description and FullTextIndex description variables (if necessary).
- Describe the characteristics of the data file, items, links and full-text indexes (if necessary) via the HFSQL properties.
- Define the description of items with HDescribeItem.
- Define the description of full-text indexes with HDescribeFullTextIndex.
- Associate the data file description with the data source (HDescribeFile, syntax 2) and links if necessary (HDescribeLink).
Solution 2 (syntax 2): Description using a data source 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. See Project description: Compilation tab for more details. - Declare an Variable of type Data source.
- Use the File description, Item description, Link description and FullTextIndex description variables (if necessary).
- Describe the characteristics of the data file, items, links and full-text indexes (if necessary) via the HFSQL properties.
- Define the description of items with HDescribeItem.
- Define the description of full-text indexes with HDescribeFullTextIndex.
- Associate the data file description with the data source (HDescribeFile, syntax 2) and links if necessary (HDescribeLink).
List of HFSQL properties used to describe a data file by programming The following properties are available in read/write mode.
| | CtAccess | The Property CxAccess allows you to manage the type of data file access when connecting OLE DB to a specific table. | CtDatabase | The Property CxDatabase is used to manage the OLE DB data source when connecting OLE DB to a specific table. | CtDescribedAccess | The Property CxAccèsDécrit is used to manage the type of access to the data file when connecting OLE DB to a specific table. | CtDescribedCaption | CtDescribedCaption is used to manage the caption of the connection to the OLE DB data source. | CtDescribedDatabase | CtDescribedDatabase is used to manage the OLE DB data source during the OLE DB connection to a specific table. | CtDescribedOLEDBProvider | CtDescribedOLEDBProvider is used to manage the name of the OLE DB provider (also called OLE DB server). | CtDescribedPassword | CtDescribedPassword enables you to define the password used to open the file during an OLE DB connection (file defined by programming only). | CtDescribedUserName | The CxUserDescript property is used to set the user name used in the Connection OLE DB to a specific table. | CtOLEDBProvider | CtOLEDBProvider is used to manage the name of the OLE DB provider (also called OLE DB server). | CtUserName | The CxUser property is used to set the user name used in the Connection OLE DB to a specific table. | DescribedDirectory | The Property WrittenDirectory allows you to manage the physical directory of HFSQL files. | DescribedName | ..DescribedName is used to manage the logical name of HFSQL files. | DescribedPhysicalName | ..DescribedPhysicalName is used to manage the physical name of HFSQL files. | Directory | The Property Directory allows you to manage the physical directory of HFSQL files. | FicCryptMethod | FicCryptMethod is used to configure the encryption mode of the data file. | Format | Format is used to configure the format of the data in the data file. | HugeFile | HugeFile is used to configure the maximum size of a data file. | LogDirectory | ..LogDirectory is used to manage the directory of the log file described in the analysis. | LogMethod | The 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).
| MmoCryptMethod | The Property EncryptionMmo allows you to set the encryption mode of the memo file (.MMO extension) associated to the data file. | MmoPackMethod | ..MmoPackMethod is used to configure the compression mode of the MMO file (containing the binary and text memos) associated with a data file. | Name | Name is used to find out- 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.
| Name55 | ..Name55 is used to manage the logical name of a data file in Hyper File 5.5 format not migrated and found in an analysis in WINDEV 19. format. | NdxCryptMethod | The Property EncryptionNdx allows you to set the encryption mode of the index HEX@ (extension .NDX) associated with the data HEX@. | PhysicalName | The Property PhysicalName allows to manage the physical name of HFSQL files. | Secure | The Property Secured allows you to set the security level of file encryption. | TextItemCompleted | The Property CompleteTextField allows you to set up the management of text fields in an HFSQL file. | Type | Type is used to find out:- 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.
| WDD55 | WDD55 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.
| WDD55Password | WDD55Password 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 HDescribeFile function Type is used to specify the type of data file to create. The following types can be created by HDescribeFile: | | hFileAS400 | AS400 file | hFileNormal | Standard file | hFileOLEDB | OLE DB file | hFileOracle | Oracle file | Versions 16 and laterhFileSQLAzure New in version 16hFileSQLAzure hFileSQLAzure | SQL Azure file | hFileSQLServer | SQL Server file | hFileSybase | Sybase file | hFileXBase | xBase file |
Business / UI classification : Business Logic
This page is also available for…
|
|
|