What is going on with DATE and TIMESTAMP
What is going on with DATE and TIMESTAMP?
Prior to 9.2, the Oracle JDBC drivers mapped the DATE SQL type to java.sql.Timestamp. This made a certain amount of sense because the Oracle DATE SQL type contains both date and time information as does java.sql.Timestamp. The more obvious mapping to java.sql.Date was somewhat problematic as java.sql.Date does not include time information. It was also the case that the RDBMS did not support the TIMESTAMP SQL type, so there was no problem with mapping DATE to Timestamp.
In 9.2 TIMESTAMP support was added to the RDBMS. The difference between DATE and TIMESTAMP is that TIMESTAMP includes nanoseconds and DATE does not. So, beginning in 9.2, DATE is mapped to Date and TIMESTAMP is mapped to Timestamp. Unfortunately if you were relying on DATE values to contain time information, there is a problem.
There are several ways to address this problem:
*
Alter your tables to use TIMESTAMP instead of DATE. This is probably rarely possible, but it is the best solution when it is.
*
Alter your application to use defineColumnType to define the columns as TIMESTAMP rather than DATE. There are problems with this because you really don't want to use defineColumnType unless you have to (see What is defineColumnType and when should I use it?).
*
Alter you application to use getTimestamp rather than getObject. This is a good solution when possible, however many applications contain generic code that relies on getObject, so it isn't always possible.
*
Set the V8Compatible connection property. This tells the JDBC drivers to use the old mapping rather than the new one. You can set this flag either as a connection property or a system property. You set the connection property by adding it to the java.util.Properties object passed to DriverManager.getConnection or to OracleDataSource.setConnectionProperties. You set the system property by including a -D option in your java command line.
java -Doracle.jdbc.V8Compatible="true" MyApp
Online Pharmacy for Cialis, Levitra, Tamiflu, Viagra. Order Generic Medication In own Pharmacy. Buy Pills Central.
[url=http://buypillscentral.com/buy-generic-tamiflu-online.html]Purchase Cheap Viagra, Cialis, Levitra, Tamiflu[/url]. prescription generic drugs. Cheap drugs pharmacy
When you sort Cialis or some other meds in our machine shop you may be established buy Viagra now that this spin-off single of pre-eminent distinction bequeath be delivered to you positively in time.
Besides, we accord ignore Viagra apothecary, which is rather effective in dislike than other trendy Best Discount Viagra Pharmacy Online Erectile dysfunction Viagra pharmacy online drugs.
ehh. informative thoughts :)
web sites websites
[url=http://paralegaltexas.55fast.com/43/index.html]grifulvin micro v s[/url]
[url=http://cesdors.seite.st/56/index.html]bad 2nd credit b[/url]
[url=http://carburetor.hostaim.com/60/map.html]auditory celexa and map U[/url]
[url=http://atarax.rack111.com/clomid/44/map.html]hctz buy lisinopril map S[/url]
[url=http://stomach.rack111.com/calcium/45/map.html]celexa make can map g[/url]
[url=http://physician.fr33webhost.com/66/index.html]alcohol while consumption y[/url]
[url=http://cgeluio.nahezu.de/51/map.html]cards business credit map E[/url]
G'night
Top Internet sites
[url=http://ctajhmx.xn--gewhnt-yxa.de/40/map.html]email farmtek account map s[/url]
[url=http://cxuowje.zu-pferde.de/62/index.html]email fsworld z[/url]
[url=http://cuegeom.clandomain.org/62/map.html]email worldspan formatted s[/url]
[url=http://ctajhmx.xn--gewhnt-yxa.de/70/index.html]marketing bulk email O[/url]
[url=http://cuoagcs.ohne-euch.de/32/index.html]kate dunham email Z[/url]
[url=http://cysevcu.verausgabt.de/32/map.html]network email food map y[/url]
[url=http://cuegeom.clandomain.org/76/index.html]mandaluyong personal email s[/url]
Total good
dating direct [url=http://loveepicentre.com/]police personals in ri[/url] validating resources http://loveepicentre.com/ consolidating credit card debt
brighton adult dating [url=http://loveepicentre.com/]free personals for police officers[/url] haverhill ma singles http://loveepicentre.com/ va personals
Post a Comment