1

When writing Java stored procedures, I often receive values via oracle.sql.ARRAY parameters. However, how do I export values via oracle.sql.ARRAY parameters? For example:

public static void fetchFavoriteFoods(oracle.sql.ARRAY favoriteFoods) {
    // What must be done here to add "pizza" and "cheese burger" to favoriteFoods?
}

2 Answers 2

1

Simply put, you don't. java.sql.Array and its implementations (like oracle.sql.ARRAY) are

a logical pointer to the data in the SQL ARRAY value rather than containing the ARRAY value's data.

Needless to say, this means that they are read-only values.

Sign up to request clarification or add additional context in comments.

Comments

0

This should be along the lines of what you are looking for: Oracle ARRAY type usage

Basically, you can create an object of your own oracle.sql.ARRAY and use it.

Comments

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.