1

I'm encountering an error in Oracle Forms 14c when trying to use the JSON_ARRAYAGG function:

identifier JSON_ARRAYAGG must be declared

Here's the context:

  • Oracle Forms version: 14c (14.1.2)
  • Database version: 19c
  • I'm trying to use JSON_ARRAYAGG in a PL/SQL block within Forms

What I've tried:

  • The same query works fine when executed directly in Toad.
  • I've verified the database version supports JSON_ARRAYAGG (it works outside of Forms)

Sample code:

DECLARE l_json CLOB; BEGIN SELECT JSON_ARRAYAGG( JSON_OBJECT( 'id' VALUE employee_id, 'name' VALUE first_name ) ) INTO l_json FROM hr.EMPLOYEES WHERE department_id = 10; END;

Questions:

  1. Is there a compatibility issue between Oracle Forms 14c and JSON functions?
  2. Do I need to enable a specific setting or library in Forms to use JSON functions?
  3. Are there known workarounds for using JSON functionality in Oracle Forms?
2
  • Many of the new "JSON" commands found in the DB are for "server" side plsql only. Forms uses "client" side plsql which is different. In cases where the call you need to make is server side only, you would need to create a DB proc and call it from Forms so it can be processed on the server. That said, keep in mind that when you do SELECT... INTO in Forms, you can only return one row. If you expecting to return more than one then you must handle each returned row (e.g. accept a row then do NEXT_RECORD and so on until all are retrieved. Commented Jun 17 at 18:46
  • For 3 - You can dump the code into a stored function or procedure and then call it as a workaround. Commented Jun 26 at 15:57

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.