How to fix deprecated oracle.sql.ArrayDescriptor, oracle.sql.STRUCT and oracle.sql.StructDescriptor

前端 未结 2 1205
Happy的楠姐
Happy的楠姐 2020-12-16 20:46

I use the below JDBC code to call an Oracle stored procedure which takes an Array input.

But the the below three classes are deprecated. How to replace this ?

2条回答
  •  忘掉有多难
    2020-12-16 21:33

    From oracle API documentation.

    ArrayDescriptor

    Use factory method OracleConnection.createOracleArray to create an instance of java.sql.Array directly.

    STRUCT

    Use java.sql.Struct interface for declaration instead of using concrete class oracle.sql.STRUCT.

    StructDescriptor

    Use factory method Connection.createStruct to create an instance of java.sql.Struct directly.

    Here are the full list of Deprecated Classes mentioned in the oracle API documentation.

提交回复
热议问题