File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes JDBC and the fly likes how to update one column of my table? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Databases » JDBC
Bookmark "how to update one column of my table?" Watch "how to update one column of my table?" New topic
Author

how to update one column of my table?

Elahe Shafie
Ranch Hand

Joined: Dec 12, 2001
Posts: 291
Dear friends,
I want to read my table and write it again with updated data like(Wed Jan 19 16:26:37 PST 2001 and change it to 1/19/2001)so how can I update this column data through my servlet?
Any advice?
Many thanks,
Elahe


Thanks,
Elahe
Elahe Shafie
Ranch Hand

Joined: Dec 12, 2001
Posts: 291
or mybe it is clear to ask this way that how can I read date like this format from database:
Wed Feb 19 16:26:37 PST 2001
Wed Jan 02 12:22:40 PST 2002
and write it like:
2/19/2001
1/02/2002
I need to update all data in date column.
I hope it is clear this time...
Many Thanks,
Elahe
Jamie Robertson
Ranch Hand

Joined: Jul 09, 2001
Posts: 1879

You should read it out of the database as a Date, and then format it for the user:

to update the database, get the formatted String date, parse it into a Date object, write the date object to the database:

Jamie
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: how to update one column of my table?
 
Similar Threads
Update using EJB-QL
dynamic column names and it's values
How to update SQL databse table
problem simply stated
JTable Problem