|
|
|
|
|
- Properties specific to the description of data files
- How to describe data files programmatically?
- Handling the items of a data file described programmatically
- Logging
File Description (Variable type) In french: Description de Fichier (Type de variable)
![HFSQL Classic HFSQL Classic](https://doc.windev.com/ext/images/us/HF.png?-2134303037) Available only with these kinds of connection
The File Description variable is used to programmatically describe data files. The description of each data file is validated by HDescribeFile. After this validation: - This data file can be handled like any other data file described in the analysis.
- The "File Description" variable is reinitialized and can be used to describe another data file.
AFile is File Description MyFile1, MyFile2 are File Descriptions // Describe the "CUSTOMER" data file AFile is File Description  AFile.Name = "CUSTOMER" AFile.Type = hFileNormal AFile.FicEncryption = hEncryptionStandard  // Description of the data file items ...  // Validate the description of "CUSTOMER" HDescribeFile(AFile) Syntax
Declaring one or more descriptions of data files Hide the details
<Variable name> is File Description <Variable name 1>, <Variable name 2> are File Descriptions
<Variable name>: Name of the "File Description" variable to declare.Remark: The a and an keywords are optional: they provide better readability. To describe a "File Description" variable: Use the WLanguage properties specific to the descriptions of data files. For more details, see the remarks. To validate the description of a "File Description" variable: Remarks Properties specific to the description of data files The table below presents the properties specific to the description of data files: Remark: The properties in bold followed by a star (*) must necessarily be initialized when a data file is described through programming. | | Property name | Effect |
---|
CtAccess | Type of access to the file when connecting to a specific table via OLE DB (taking into account the changes made with HConnect) | CtDatabase | OLE DB data source when connecting to a specific table (taking into account the changes made with HConnect) | CtDescribedAccess | Type of access to the file when connecting to a specific table via OLE DB (ignoring the changes made with HConnect) | CtDescribedCaption | Caption of the connection to the OLE DB data source | CtDescribedDatabase | OLE DB data source when connecting to a specific table (ignoring the changes made with HConnect) | CtDescribedOLEDBProvider | Name of the OLE DB server (ignoring the changes made with HConnect). | CtDescribedPassword | Password used to open the file during an OLE DB connection | CtDescribedUserName | Name of the user during an OLE DB connection (ignoring the changes made with HConnect). | CtOLEDBProvider | Name of the OLE DB server used (taking into account the changes made with HConnect). | CtUserName | Name of the user during an OLE DB connection (taking into account the changes made by HConnect). | DescribedDirectory | Physical directory of HFSQL files (this property ignores the changes of directory performed by HChangeDir or HSubstDir). | DescribedName | Logical name of a data file. | DescribedPhysicalName | Physical name of HFSQL files (while ignoring the changes of name performed by HChangeName). | Directory | Physical directory of HFSQL files (this property takes into account the changes of directory performed by HChangeDir or HSubstDir). | FicEncryption | Data file encryption mode | Format | Format of data in the data file (ANSI or Unicode). | HugeFile | Maximum size of a data file. | LogDirectory | Directory of log file described in the analysis. | LogMethod | Log mode of a data file. | MmoEncryption | Encryption mode of memo file (.MMO extension) associated with the data file | MmoPackMethod | Compression mode of the MMO file (containing text and binary memos) associated with the data file | Name ( * ) | Name of HFSQL file. | Name55 | Logical name of a file in Hyper File 5.5 format found in an analysis in WINDEV format. | NdxEncryption | Encryption mode of index file associated with the data file | NullableIndex | Support of NULL values in key items. | NullSupported | Support of NULL values. | PhysicalName | Physical name of data files. | RepeatableReadSupported | The file is used in an HFSQL Client/Server transaction that includes a "Repeatable Read" isolation level. | Secure | Security level regarding the encryption of data files. | TextItemCompleted | Fills (or not) the text items with space characters. | Type | Type of data file. | Unalterable | Unalterability of data files. | WDD55 | Path of the WDD file in 5.5 format used to handle the data files in 5.5 format in a WINDEV application. | WDD55Password | Password that will be used to handle a file defined through programming in Hyper File 5.5 format in an analysis in WINDEV format. |
Handling the items of a data file described programmatically When creating a data file in the data model editor, the names of the data files and items are automatically recognized by the compiler. When creating a data file using a "File Description" variable, the names of the data file and its items can be defined with the Name property. These names are not automatically recognized by the compiler. A compilation error occurs if these names are used to identify the data file or the items. The name of the data file must be declared as data source using the data source keyword, for the compiler to recognize this name. This data file can be handled by its name in the code editor. For example: AFile is File Description ... AFile.Name = "CUSTOMER" ... HDescribeFile("CUSTOMER") ... CUSTOMER is Data Source ... HReadFirst(CUSTOMER, "CUSTNAME") Remark: The name of the data file can also be declared with the Extern keyword. However, the process execution will be slower. Logging When the data file is described programmatically: - if the data file is logged and if no item is logged, all the items (except for the composite keys) are automatically logged.
- if the data file is logged and if at least one item is logged, the other items are not modified.
This page is also available for…
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|