SqlServer也有BUG?日期查询结果差两天  

之前没怎么注意,SQLServer的Date类型,增删改没错,显示总是差两天.今天有人问才发现,惭愧.原来微软也有坑

详见微软官方的feedback,传送门

问题如下

Result of JDBC query of date type column decrements days by 2

解决方案在MSDN的blog  传送门

Dear SQL Server developers and users:

Thank you for your ongoing support of the Microsoft JDBC Driver for SQL Server.  Some of you reported problems with dates when using JRE 1.7.

The Microsoft JDBC Driver for SQL Server currently supports JRE 1.5 & JRE 1.6, however we have made modifications to return correct date values regardless of the JRE version. This modification is available in the production version of the Microsoft JDBC Driver 4.0 for SQL Server.  The Microsoft JDBC Driver 4.0 for SQL Server
is supported on JRE 1.5 and JRE 1.6, and support for JRE 1.7 is on our roadmap.
In addition, the driver modification is also available for SQL Server 2000 customers as a hotfix in the 3.0 version of our driver. Please review the hotfix article to determine if the fix is applicable to you and if so, click the link to download the hotfix (applicable for all platforms).

As always we are interested in your feedback. You may report bugs and issues via our forums. If you encounter Java bugs you may report those to Java.


Thank you,
Shamitha Reddy
Program Manager Microsoft JDBC Driver for SQL Server

 

JDBC 4的下载地址 传送门

欢迎大佬支持本博客的发展 -- Donate --

本文链接:SqlServer也有BUG?日期查询结果差两天

转载声明:本站文章若无特别说明,皆为原创,转载请注明来源:三十岁,谢谢!^^


分享到:          
  1. 谢谢博主分享啦

  2. 哈哈,我也曾发现过~

  3. 厉害,博主也将这个bug找出来,并处理了,不错!

    【红博客】-关注中小企业及创业

  4. 顶 谢谢博主分享

  5. 顶一下 谢谢博主分享

  6. 数据库的,感觉蛮难搞得懂。

  1. 没有通告