When I try to retrieve this data using rs.getTime("Job_Start_Time") and
rs.getTime("Job_End_Time"), I am getting it 20:23:20 and 04:23:20
respectively.
Can anyone let me know the workaround or anything that I'm missing out on?
Most of the times, it does. Generally, I retrieve these timings and display it on the web page(form). If I click on the save button, it saves 900-01-01 20:23:00.000 | 1900-01-02 04:23:00.000 in the database.
Sometimes, I do get 20:46 and 04:46 when I retrieve the same record. I'm watching that there is pattern(difference of 23)
Have you tried this with Microsoft's JDBC driver? jTDS does some work to produce a DateTime object - trying it with a different driver would be a quick test to see if there is a driver bug (though its not one I know of in jTDS).
amod god
Greenhorn
Joined: Mar 17, 2009
Posts: 8
posted
0
Thanks Paul.
Let me check with that driver.
Regards
-Amod
amod god
Greenhorn
Joined: Mar 17, 2009
Posts: 8
posted
0
Hey Paul,
It looks like we are through. My initial testing with Microsoft's driver is successful. But as per the requirement, I *have* to use the jTDS driver. Let me check with the later version of jTDS driver.
Interesting requirement! I suppose at least you can deliver your software exactly as specified with the error in it. I'd speak to whoever wrote the requirement and ask why jTDS is required. I can understand why you would use jTDS over the old MS SQL Server 2000 driver - it was bug ridden, largely unsupported (MS bough the code from someone else and had no legal rights to update it) and undistributable (for the same reason). But now of those issues exist with the newer driver.
Have you checked jTDS JIRA? They might have a patch.
amod god
Greenhorn
Joined: Mar 17, 2009
Posts: 8
posted
0
Actually, the application is being integrated with the other one. So, we have to make sure that both the applications are using the same driver.(and its a JTDS ) I tried with jTDS1.2.2 jar file but the result remains the same.
I couldn't find any solution in JIRA. I will have to continue with my *research* on this.
Regards,
-Amod
Bauke Scholtz
Ranch Hand
Joined: Oct 08, 2006
Posts: 2458
posted
0
Please post the DDL of the table.
It would also be helpful if you cut down the whole thing into an SSCCE and post it here.
amod god wrote:Actually, the application is being integrated with the other one. So, we have to make sure that both the applications are using the same driver.(and its a JTDS ) I tried with jTDS1.2.2 jar file but the result remains the same.
I couldn't find any solution in JIRA. I will have to continue with my *research* on this.
Regards,
-Amod
jTDS is open source. Have you tried debugging into the source? You may have stumbled on a genuine bug (though jTDS has been fairly stable for quite some time now).