A script-enabled browser is required for this page to function properly.

About Accessing Subprograms in Another User's Schema

To access a subprogram in another user's Schema or one in a remote database, you must create a synonym to hide the username or Db_Link name from the PL/SQL compiler such that the result takes the form:

You can create synonyms to nickname remote Stored Programs, hiding the username or Db_Link:

Where subprogram is either a procedure or a function.

About accessing subprograms in another user's Schema Examples

To call the package function 'LIBOWNER.LIB_HR.GET_SSN', you could create a synonym for the LIB_HR package that includes the Schema name (the owner name) as follows:

CREATE SYNONYM lib_hr_syn
FOR libowner.lib_hr;

Then invoke the function from within your form as follows:

ss_num := lib_hr_syn.get_ssn(:Emp.Empno);

If the package function is at a remote site accessible through a database link named basel, for example, then you could create a synonym for the package, including the database link name:

CREATE SYNONYM basel_lib_hr_syn
FOR libowner.lib_hr@basel;

and invoke the function within your PL/SQL code as:

ss_num := basel_lib_hr_syn.get_ssn(:Emp.Empno);

Alternately, you could create a synonym for the function itself, hiding both the Schema and Db_Link information:

CREATE SYNONYM basel_lib_hr_get_ssn_syn
FOR libowner.lib_hr.get_ssn@basel;

and invoke the function from Oracle Forms as:

ss_num := basel_lib_hr_get_ssn_syn(:Emp.Empno);

Of course, any of the synonyms above could have been created as PUBLIC SYNONYMS if appropriate.


About Stored Programs

Creating a Stored Program