File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes JDBC and Relational Databases and the fly likes Use of sql.Date Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » JDBC and Relational Databases
Bookmark "Use of sql.Date" Watch "Use of sql.Date" New topic

Use of sql.Date

Melody Siu

Joined: Nov 06, 2003
Posts: 21
Hi, is there any benefit for having the sql.Date object exposed to the web tier after object is retrieved from its persistent storage versus using Calendar object through out except in the block of code that needs to deal with sql.Date (i.e. insert/update sql methods).
Wayne L Johnson
Ranch Hand

Joined: Sep 03, 2003
Posts: 399
I think your analysis is correct: "java.sql.Date" should be used as close to the database tier as possible, and exposed to the outside world as another class instance, such as "java.util.Calendar".
I agree. Here's the link:
subject: Use of sql.Date
It's not a secret anymore!