Navigation: Linkar CLIENTS > Functions Objects LkStrings. Input Format |
Scroll Prev Top Next More |
This topic details the format of data sent to the DBMS in New and Update operations.
Choose from three formats described here to send data to the server: MV Format, XML, or JSON. The format contained in LkStrings does not need to be pre-identified; If an LkStrings object is correctly built, Linkar will understand it and will execute the operation.
No special organization or pre-processing is required. When specifying MV Format for New and Update operations, the DBMS will expect a common dynamic array, delimited by system delimiters. The data is identical to that used in a BASIC WRITE operation. |
One or more records can be sent to the DBMS using the XML Format. The specific XML Input Format of data transmitted to the DBMS for New and Update operations does not need to be the same as the Output Format expected back from other operations (XML, XML_DICT, XML_SCH). Feel free to Read data from the DBMS in one XML format and write it back in another.
The XML Format depends on the file dictionary, with definition IDs used as field/element nodes within a RECORD node. If no dictionary definition is found for a named element, an error is returned and the write operation fails. Applications must be prepared for failed write operations.
Linkar will search for the LKITEMID tag for the ItemID to create/update if required. No dictionary definition for an ID is used.
If using optimistic locking, the ORIGINAL_RECORDS tag is required.
If "calculated dictionaries" are used, that is, if one of the nodes references a dict definition with a correlative, Linkar will throw an error message and abort the write operation.
MV Values and SubValues are denoted by a delimiter, not as sub-nodes.
Example:
<?xml version="1.0" encoding="UTF-8"?> <LINKAR> <RECORDS> <RECORD> <LKITEMID>2</LKITEMID> <CUSTOMER>73</CUSTOMER> <DATE>17566</DATE> <ITEM>101105</ITEM> <QTY>286</QTY> <PRICE>271.18</PRICE> <DELIVERYDATE>17619ü17659</DELIVERYDATE> <QTYPARTIAL>143ü143</QTYPARTIAL> </RECORD> </RECORDS> </LINKAR>
Experiment with the Linkar TESTER program, or with the LINKAR REST API Test utility, executing Update functions, with different UpdateOptions to see the results. |
One or more records can be sent to the DBMS using the JSON Format. The specific JSON Input Format of data transmitted to the DBMS for New and Update operations does not need to be the same as the Output Format expected back from other operations (JSON, JSON_DICT, JSON_SCH). Feel free to Read data from the DBMS in one JSON format and write it back in another.
The JSON Format depends on the file dictionary, with definition IDs used for key/value pairs within a RECORD array. If no dictionary definition is found for a named element, an error is returned and the write operation fails. Applications must be prepared for failed write operations.
Linkar will search for the LKITEMID property for the ItemID to create/update if required. No dictionary definition for an ID is used.
If using optimistic locking, the ORIGINAL_RECORDS property is required.
If "calculated dictionaries" are used, that is, if one of the property keys references a dict definition with a correlative, Linkar will throw an error message and abort the write operation.
MV Values and SubValues are denoted by a delimiter, not as sub-nodes.
Example: { "RECORDS": [{ "LKITEMID": "2", "CUSTOMER": "73", "DATE": "17566", "ITEM": "101105", "QTY": "286", "PRICE": "271.18", "DELIVERYDATE": "17619ü17659", "QTYPARTIAL": "143ü143" } ] }
Experiment with the Linkar TESTER program, or with the LINKAR REST API Test utility, executing Update functions, with different UpdateOptions to see the results.
|