oracle / node-oracledb

Oracle Database driver for Node.js maintained by Oracle Corp.
http://oracle.github.io/node-oracledb/
Other
2.25k stars 1.07k forks source link

xmlType is not working #1454

Closed keshavwork closed 2 years ago

keshavwork commented 2 years ago

Hi i am using below code my code is excite in oracle db and response also printing in oracle. same response is not printing in nodejs

const result = await connection.execute( declare x xmltype := xmltype('<EVENT><REQUEST API_CODE="10999" CLIENT_ID="" EXTERNAL_APPLICATION="reactUser4" EXTERNAL_REFERENCE="" EXTERNAL_SYSTEMS_LOG_REFERNCE="" EXTERNAL_USER="reactUser4" NO_OF_ROWS="10" OPERATION_TYPE="ADJ_LEVEL" POSITION="0" REQUEST_TYPE="V" SEARCH_PARAM="11"/></EVENT>'); y xmltype; begin common_call__api(x, y); dbms_output.put_line(y.getclobval()); end;);

Response :

hi getting new errpr null {}

cjbj commented 2 years ago

Without seeing more of your code, I can only guess. (Also I have no idea what 'printing in oracle' means).

Have you looked at the examples of how to fetch dbms_output? See dbmsoutputgetline.js and dbmsoutputpipe.js .

However, I'm not sure using dbms_output will be the best way to get the data into Node.js. Consider returning a LOB bind variable as shown in the documentation Simple LOB Queries and PL/SQL OUT Binds

keshavwork commented 2 years ago

yes i got the solution thanks for your support.