0

I'm trying to pass an array of values to Oracle DB from Java application. Right now my code looks like this:

java.sql.Connection c = getConnection();
java.sql.Array myArray = c.createArrayOf("CHAR", new Object[]{'c', 'd'});

But I receive a java.sql.SQLException: Unsupported feature I'm using DB version 11 and Java 8. This should work accordingly to most of the examples I found on the web. What am I missing?

1 Answer 1

2

Many methods of various JDBC interfaces can throw SQLUnsupportedFeatureException. The reason is tat although the JDBC API is common it is defined for superset of all possible relational databases. But not all such databases and their drivers support all features.

Specifically as far as i know among well known databases arrays are supported only by posgress. I think that oracle does not support arrays as a base type. This is the reason for exception. So, try to find other design that does not require arrays.

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

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.