Question

Is it possible to create a java representation of a package-level oracle associative array. For example, given the following:

CREATE OR REPLACE PACKAGE MyPackage AS
    TYPE t_numbers IS TABLE OF NUMBER INDEX BY PLS_INTEGER;

I find I cannot write the following java:

ArrayDescriptor descriptor =
    ArrayDescriptor.createDescriptor("MyPackage.t_numbers", connection);

(throws a SQLException "Invalid name pattern").

What is the correct syntax for an ArrayDescriptor referencing a package-level associative array? Does such a thing even exist?

OTHER TIPS

You can also use OracleConnection.createOracleArray()

Note that arrayTypeName should be the table of type.

Also, you may find my my answer on getArray() and writeArray() useful.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top