- Characteristics of created data file
- Additional files created
- Managing passwords
- Managing fatal errors when creating a data file
- Managing non-Latin character sets
- Replication: Range of identifiers
- Priority for defining the location of log files
- Creating an existing table
- Constraints for referential integrity
- Managing indexes
- Creating the data file from its description
- DATE and TIME items with the Native SQL Server Connector
- HCreation and Native SQLite Connector
HCreation (Function) In french: HCreation
Not available with this kind of connection
Creates an empty data file (.FIC extension) with the index file and the memo file if necessary. This function can also be used to delete all records from a data file. In this case, the record in memory is not canceled. To initialize it, use HReset. Remark: The automatic creation of non-existing data files can be enabled in the project description ("Files" tab of the project description, "Automatically create the data files when they are opened"). HCreation is automatically used if the data file does not exist when it is handled for the first time.
// Create the Orders data file (described in the analysis) HCreation(Orders)
Syntax
<Result> = HCreation(<Data file> [, <Password> [, <Path of the JNL file> [, <Path of the JournalOperation file> [, <Option>]]]])
<Result>: Boolean - True if the data file was created,
- False if a problem occurs. HError is used to identify the error. If a fatal error occurs, a specific process is required to continue the program and to check whether the data file was created (see the Notes).
<Data file>: Character string Name of data file to create.
<Password>: Optional character string - Password associated with the data file.
 The password of HFSQL files is not case-sensitive. - Empty string ("") if no password is used.
<Path of the JNL file>: Optional character string Access path to the JNL file associated with the logged data file. This parameter is only taken into account if the data file is logged. In this case, <File name>JNL.fic will be created at the specified location.
<Path of the JournalOperation file>: Optional character string Access path to JournalOperation file and to JournalIdentification file associated with the logged file. The JournalOperation file contains all the operations performed on the file with logs. This parameter is only taken into account if the data file is logged.
<Option>: Optional Integer constant Options for creating the data file: | | hChangeCharset | The character set defined by ChangeCharset will be taken into account in the new data file. Sorts, searches, ... on string keys (strings, characters, date and time) will be performed according to this character set. | hNoLink | Management of integrity: The links are not updated on the server (creation, modification or deletion). Reminder: by default, the links are updated on the server when creating a data file.
|
Remarks Managing passwords - The password can be defined:
- when the data file is created by HCreation.
- before the data file is created by HPass.
- If the data file existed and if it was password protected, the data file is re-created, even if the password changes or does not exist anymore.
Caution: The password is independent of data encryption. The data encryption must be configured during the file description in the data model editor ("Details" tab).
Managing fatal errors when creating a data file If a fatal error occurs when creating a data file, it may be interesting to continue the program while checking whether the data file was created or not. To do so, we recommend that you perform the following exception process:
WHEN EXCEPTION IN HCreation(PARENT) DO Error("HFSQL error: " + HError()) ELSE Trace("The file is created") END
Creating the data file from its description The data file can be directly created from its description in the data model editor. To do so, select "Create the data file" and select the directory where the data file must be created.
This page is also available for…
|
|
|