I am trying to pass a large number of records as a stringify object from client to the server. In the server side there is a function called ‘Get_Records’ to capture that string object. Then it should parse the string object into records back and do necessary modifications. This is the way of calling the stringify function from client side.
stringify(rec, "IS_TRANSACTION=${IsTransaction}^COMPANY_ID=${CompanyId}^PR_TRANSACTION_SEQ=${PrTransactionSeq}^SPRICE=${SPrice}^SQUANTITY=${SQuantity}^", JSON) into SelectionVar;
call Get_Records(SelectionVar) into invoiceExist;
Below is the server side function to capture the string object.
FUNCTION Get_Records(
selection_string_ IN VARCHAR2 ) RETURN VARCHAR2
IS
records_ json_array :=
json_array.parse(selection_string_);
current_selection_ VARCHAR2(32000);
BEGIN
//Code
END;
But when I try to pass the string object for a large number of records from the stringify() function, it is not captured by the server side function ‘Get_Records’. It gives an error called, ‘unimplemented or unreasonable conversion requested, details: undefined undefined’. I tried using the ‘CLOB’ datatype for the server side function. But it is also not working for a very large number of records. Is there a proper way to pass the string object retrieved from the stringify function to the server side. ?
2
Answers
Intercept the length of the string to make it less than 1000. Or store it in a file and upload it
Prior to Oracle version 19c, JSON functionality is a bit limited. Which version are you working with?