My code is as follows:
PreparedStatement pstm = con.prepareStatement("insert into parameter(Parameter) values(?)");
Array a = con.createArrayOf("TEXT",s1);
pstm.setArray(1,a);
pstm.executeUpdate();
The stacktrace is as follows:
Exception in thread "main" java.sql.SQLFeatureNotSupportedException
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:525)
at java.lang.Class.newInstance0(Class.java:372)
at java.lang.Class.newInstance(Class.java:325)
at com.mysql.jdbc.SQLError.notImplemented(SQLError.java:1329)
at com.mysql.jdbc.JDBC4Connection.createArrayOf(JDBC4Connection.java:56)
at project.Project.main(Project.java:295)
Please help me in rectifying this issue. Thank you in advance.
http://docs.oracle.com/javase/6/docs/api/java/sql/SQLFeatureNotSupportedException.html
It means that your mysql driver can't do that operation. Either use a different driver/database, or don't use that method.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With