Assuming you are using Oracle here since this looks like a known issue with the 10g JDBC driver.
The 10g driver reports DATE columns as Timestamp in the metadata but if you do a getObject() you get a java.sql.Date. Oracle claims you should use the TIMESTAMP datatype instead if you want the time portion. Drawback here is that getObject() returns an oracle.sql.TIMESTAMP which does not extend any of the standard JDBC classes. To work around this you would have to do something like this:
SqlRowSet rset = jdbcTemplate.queryForRowSet(
"select cast(sysdate as timestamp) from dual");
try {
while (rset.next()) {
System.out.println("-> " +
((oracle.sql.TIMESTAMP)rset.getObject(1)).timestam pValue());
}
} catch (SQLException e) {
e.printStackTrace();
}
We have a workaround for this in the queryForList methods but for queryForRowSet we depend on Sun's RowSet implementation to extract the data from the original ResultSet.
分享到:
相关推荐
解决libarcsoft_face.dll:Cant‘t find dependent library报错,相关文章:https://blog.csdn.net/chw0629/article/details/122557038
名称:Cant Find Anything -------------------- 版本:1.3 作者:uploadextsubmissions 分类:网页增强 -------------------- 概述:当正在搜索的网站不工作时,此扩展程序会为您提供活动网站。 描述: 网站没有...
cant mustnt的区别PPT课件.pptx
Marco Cantù Object Pascal Handbook The Complete Guide to the Object Pascal programming language for Delphi developers Delphi 10.1 Berlin Edition, June 2016
cant的五种特殊句型PPT学习教案.pptx
i still cant speak english ,troduction method correction personalization
信息安全_数据安全_If you cant trust the phone comp 安全风险 边界防御 企业安全 漏洞分析 安全开发
在本文中,我们将深入探讨与“On the CANT Bus, No One Can Hear You Scream”相关的信息安全和数据安全议题,特别是在可信计算、法律法规、网络犯罪和安全对抗的背景下。这个主题涉及了汽车行业的CAN(Controller ...
AS-23-Uhlmann-You-Can-Run-But-You-Cant-Hide
【Alt Cant-开源】是一个专为Windows平台设计的小型应用程序,其主要功能是处理剪贴板中的URL。这款工具能够帮助用户对复制的网址执行多种缩短操作,同时提供了匿名浏览的功能,确保用户在进行网址转换时可以保护...
报错信息: Traceback (most recent call last): File “D:/flaskProject/test.py”, line 35...return self.apply_async(func, args, kwds).get() File “\lib\multiprocessing\pool.py”, line 657, in get raise se
Chris Cant的著作。转成pdf的文件了,方便大家学习。
在英语表达中,"can't be too careful" 这个短语经常被用来强调无论怎样小心都不为过,尤其是在安全或者谨慎行事的场合。这句话的含义是,越小心越好,越谨慎就越能避免潜在的问题。例如,当你在街上行走时,你永远...
导出的oracle10g的dmp数据库文件,想导入到11g的oracle里面去,导入报错:can't recognize compressed file header.即需要修改dmp文件的文件名里面的版本号,用此软件修改:11g R2:V11.02.00 11g R1:V11.01.00 ...
Chrome合金下载literally-cant-even.crx ,然后进入Chrome 的首选项、扩展程序,启用开发者模式,然后将文件拖到窗口中。发展克隆回购安装crxmake为 Chrome 构建( gem install crxmake ) 对每个浏览器进行更改运行...
SELECT '100000' cant_code, 'ȫ' cant_name, '0' super_code, '0' super_codex, '0' cant_note FROM dual UNION ALL SELECT cant_code, cant_name, DECODE(level, '3', '100000', super_code) super_code, ...
在ubuntu14.04中交叉编译中用到的parallel.cpp,地址在opencv-3.0.0/modules/core/src/parallel.cpp,详细步骤可参考我的博客http://blog.csdn.net/u012354697/article/details/50655597
错误提示:Error: Can’t create/write to file ‘C:\WINDOWS\TEMP\#sql_738_0.MYD’ (Errcode: 17) Errno.: 1 问题分析: 1、C:\Windows\TEMP 文件夹权限不够,至少也要给出 USERS 组的可读可写权限;...