How to Pass Variables from PL/SQL to Javascript inside a Function



How to Pass Variables from PL/SQL to Javascript inside a Function

How to Pass Variables from PL/SQL to Javascript inside a Function

This video creates a function that illustrates by-directional variable sharing between pl/sql variables and javascript variables inside a 21c database function.

The video begins by showcasing how to query and determine the version of the database you are running, then execute a simple javascript program inside the Oracle Multi-lingual engine to determine if the feature is enabled. We then query the database inside Oracle APEX 21.1.1.7 leveraging SQL*Workshop and show a sample pl/sql function creating a Code Name for a player. After seeing the end result, we will walk you line by line through the sample code so you understand:
– How to pass a number in variable from PL/SQL to Javascript
– How to import the number into a Javascript variable
– How to execute a Query inside Javascript against the Oracle Database
– How to retrieve and iterate through results in Javscript
– How to export a Javascript text string to a pl/sql varchar2
– How to import javascript text into a pl/sql varchar2
– How to open and close a dbms_mle context

Example Code can be found inside the git repo at the link below.

https://github.com/chipbaber/apex_mle/blob/main/plsql_mle.md

#mle #21c #apex #javascript #oracle

Comments are closed.