Meaningless Drivel is fun!*
The moose likes JDBC and the fly likes ResultSet.getDate() retrives only Date Information but no Time Information Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » JDBC
Bookmark "ResultSet.getDate() retrives only Date Information but no Time Information" Watch "ResultSet.getDate() retrives only Date Information but no Time Information" New topic
Author

ResultSet.getDate() retrives only Date Information but no Time Information

Swapneel Killekar
Greenhorn

Joined: Jun 22, 2011
Posts: 14
Hi,

I have a very generic Code to Copy the data from One Database to another Database with same schema.



Here on Line no 37 when i do ResultSet.getDate(currColumnIndex), it retrives only the date information but no time. which is then lost when i insert it into another database.

Kindly point out where i am going wrong.

Thanks in Advance.
Sudheer Bhat
Ranch Hand

Joined: Feb 22, 2011
Posts: 75
If your database supports Database links, why don't you populate the target database using the INSERT statement?

You can probably run this query in the target DB.

INSERT INTO table SELECT * FROM table1@dblink to source db

 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: ResultSet.getDate() retrives only Date Information but no Time Information