wood burning stoves 2.0*
The moose likes JDBC and the fly likes Use of sql.Date Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Databases » JDBC
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".
It is sorta covered in the JavaRanch Style Guide.
subject: Use of sql.Date
Similar Threads
util.Date to sql.Date
sql.date trouble
Convert String to sql.Date
util.Date to sql.Date