|
|
|
|
|
- Type of import
- Array items
HImportJSON (Function) In french: HImporteJSON
 Available only with these kinds of connection
HImportJSON(Customer, "C:\MyFiles\Customer.json", "", "", hImpCreation, PROGBAR_ProgBar1)
Syntax
<Result> = HImportJSON(<Data file> , <Path of the JSON file> [, <List of destination items> [, <List of JSON keys to import> [, <Options> [, <Progress Bar>]]]])
<Result>: Boolean - True if the operation was performed,
- False if an error occurs. HError identifies the error.
<Data file>: Character string Name of the HFSQL Classic data file into which the JSON data is to be imported. If the physical data file does not exist, it is automatically created. <Path of the JSON file>: Character string Full path to the JSON file to be imported. <List of destination items>: Optional character string Names of items in the data file into which the JSON data is to be imported. These names can be delimited by simple quotes and separated by commas or carriage returns (CR). Items of type Composite key, Binary Memo and Binary are ignored. Items not included in this list will be initialized with the default value defined in the analysis. If this parameter is not specified or is an empty string (""), all items are imported (except compound keys, binary items and binary memos) in the order in which they were created in the physical file. <List of JSON keys to import>: Optional character string List of keys associated with the values from the JSON file to be imported. If this parameter is not specified or is an empty string, the values of all keys in the JSON file are imported. <Options>: Optional Integer constant (or combination of constants) Type of import: | | hImpBreakable | The import operation can be interrupted by pressing Esc. If the import is interrupted, the imported records are kept in the data file. | hImpCreation | If the data file into which the data will be imported already exists, it is overwritten. | hImpNormal (default value) | If the data file into which the data will be imported already exists, it is populated with the imported data, otherwise the data file is created. |
<Progress Bar>: Optional control name or window name - Name of the window in which the progress bar will be displayed.
- Name of the Progress Bar control.
Remarks Type of import If the list of JSON keys is specified, all "JSON values" whose key names are identical to the names of the items in the data file will be imported. Example: The data file defined in the analysis contains the following items: ITEM1, ITEM2, etc. The JSON file should therefore have the following structure: {"File": { "ITEM1":Data of ITEM1, "ITEM2":Data of ITEM2, ... } } JSON keys that do not exist in the analysis or are not specified in the list of items will be ignored during the import. If the list of JSON keys is not specified, the values of the JSON keys are imported into the items of the HFSQL data file that have the same name as the JSON keys. Array items HImportJSON can also be used to import array items. Business / UI classification: Business Logic
This page is also available for…
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|