我是靠谱客的博主 玩命翅膀,最近开发中收集的这篇文章主要介绍oracle.jdbc.V8Compatible,觉得挺不错的,现在分享给大家,希望可以做个参考。

概述

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 expect 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 should 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 would 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); 

最后

以上就是玩命翅膀为你收集整理的oracle.jdbc.V8Compatible的全部内容,希望文章能够帮你解决oracle.jdbc.V8Compatible所遇到的程序开发问题。

如果觉得靠谱客网站的内容还不错,欢迎将靠谱客网站推荐给程序员好友。

本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
点赞(46)

评论列表共有 0 条评论

立即
投稿
返回
顶部