aspose file tools*
The moose likes JDBC and the fly likes JDBC( sql.Date and util.Date) Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Databases » JDBC
Bookmark "JDBC( sql.Date and util.Date)" Watch "JDBC( sql.Date and util.Date)" New topic
Author

JDBC( sql.Date and util.Date)

Prasath Manohar
Greenhorn

Joined: Mar 21, 2006
Posts: 2
Can I store the System's current Date to Oracle DB.If so can I use both sql.Date and util.Date in the same jdbc program,try to explain me with an example...
Scott Selikoff
author
Saloon Keeper

Joined: Oct 23, 2005
Posts: 3710
    
    5

Do you want the application server's date/time or the database server's date/time, because both are available. Oracle has a sys time command whereas java just requires you create a new date. Depending on how you want to use it, you might consider a database solution that automatically inserts in a timestamp when the record is inserted.


My Blog: Down Home Country Coding with Scott Selikoff
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: JDBC( sql.Date and util.Date)