|
|
|
|
|
- Exporting the query content
- Exporting a single record
- Array items
HExportJSON (Function) In french: HExporteJSON
Not available with these kinds of connection
Exports the records found in a data file (HFSQL or OLE DB), view or query to a JSON file.
HExportJSON(CUSTOMER, "C:\TEMP\Customer.json", hExpCreation)
Syntax
<Result> = HExportJSON(<Data file> [, <JSON file> [, <Items to export>]] [, <Options> [, <Progress Bar>]])
<Result>: Boolean - True if the operation was performed,
- False if a problem occurs. HError is used to identify the error.
<Data file>: Character string Name of the data file, view or query used. If this name is not specified, HExportJSON will use the last data file used by the last HFSQL function (function starting with "H"). <JSON file>: Optional character string Full path of JSON file to be generated. <Items to export>: Optional character string List of names of items to export. The names are delimited by single quotes and they are separated by commas or CR characters. The names of composite key items, binary items and binary memo items are ignored. If this parameter is an empty string (""), all of the data file items are exported (except composite key, binary, binary memo, and password items). <Options>: Optional constant Specifies the creation mode of JSON file: | | hExpBreakable | The export can be interrupted by pressing Esc. If the export is interrupted, the JSON file is valid and it only contains the records exported before the interruption. | hExpCreation | If the JSON file already exists, it is overwritten. An error occurs if this option is not specified and if the JSON file exists. | hExpNormal (default value) | Standard operating mode. |
<Progress Bar>: Optional control name or window name Name of Progress Bar control or name of window used to show the progress of file creation. Remarks Exporting the query content To export the query content, you must initialize the query ( HExecuteQuery) before using HExportJSON. Exporting a single record Array items If one of the exported items is an Array item, each element of the array item is exported in a new level: {"File": { "Item1":Data of item 1, "Item2":Data of item 2, "ArrItem": [Data element 1, Data element 2, ...] ... } } Reminder: Composite key, binary, binary memo and password items are ignored. Business / UI classification: Business Logic
This page is also available for…
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|