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 Can we store Objects In DATABASE..? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Databases » JDBC
Bookmark "Can we store Objects In DATABASE..?" Watch "Can we store Objects In DATABASE..?" New topic
Author

Can we store Objects In DATABASE..?

Mortin kim
Ranch Hand

Joined: Nov 15, 2007
Posts: 44
HI.,

can we store objects in database,if so how..?
can any one send me the code.

Thanks and regards
Kim.
Campbell Ritchie
Sheriff

Joined: Oct 13, 2005
Posts: 37897
    
  22
I thought, why not serialize it to a byte[] array and then put it in the database as a CLOB?

I found this article using Google.
Jeanne Boyarsky
internet detective
Marshal

Joined: May 26, 2003
Posts: 30057
    
149

Originally posted by Campbell Ritchie:
I thought, why not serialize it to a byte[] array and then put it in the database as a CLOB?

I think Campbell means a BLOB. Blobs are for binary data (bytes) and Clobs are for character date (chars.)


[Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Blogging on Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, OCAJP, OCPJP beta, TOGAF part 1 and part 2
Campbell Ritchie
Sheriff

Joined: Oct 13, 2005
Posts: 37897
    
  22
Yes, you are right. I was mistaken; BLOB is correct. Sorry.
 
Don't get me started about those stupid light bulbs.
 
subject: Can we store Objects In DATABASE..?
 
Similar Threads
session max limit
Arraylist Size
how to store object in a table
Can I store objects
ArrayList / Vector