Oracle. JDBC. v8compatible

Source: Internet
Author: User

We are using the ojdbc14.jar driver to talk to a 10.1.0.4 version database. when calling GetObject () on a rowset, asking for a column that has database type Timestamp (9), I need CT to get a java. SQL. timestamp. instead, I get an oracle. SQL. timestamp, which cannot be casted to Java. SQL. timestamp.

Reading the Oracle forums and manuals, I get the impression that the default mapping shoshould be to the java. SQL. * types-if possible-and that mapping to Oracle. SQL. * types is optional.

Can anyone shed some light on this? What is the default mapping and how can it be influenced? Any help wowould be greatly appreciated.

Ava. util. properties prop = new java. util. properties ();
Prop. Put ("oracle. JDBC. v8compatible", "true"); // so GetObject returns timestamp!
Prop. Put ("user", "Scott ");
Prop. Put ("password", "Tiger ");
String url = "JDBC: oracle: thin: @ host: Port: Sid ";

Connection conn = drivermanager. getconnection (URL, Prop );

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.