This week's book giveaway is in the Android forum.
We're giving away four copies of Head First Android and have Dawn & David Griffiths on-line!
See this thread for details.
The moose likes JDBC and Relational Databases 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


Win a copy of Head First Android this week in the Android forum!
JavaRanch » Java Forums » Databases » JDBC and Relational Databases
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

 
 
subject: ResultSet.getDate() retrives only Date Information but no Time Information
 
jQuery in Action, 3rd edition