• Post Reply Bookmark Topic Watch Topic
  • New Topic

Can we store Objects In DATABASE..?

 
Mortin kim
Ranch Hand
Posts: 44
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
HI.,

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

Thanks and regards
Kim.
 
Campbell Ritchie
Marshal
Posts: 53159
124
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
author & internet detective
Sheriff
Posts: 36027
431
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.)
 
Campbell Ritchie
Marshal
Posts: 53159
124
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes, you are right. I was mistaken; BLOB is correct. Sorry.
 
Don't sweat petty things, or pet sweaty things. But cuddle this tiny ad:
the new thread boost feature: great for the advertiser and smooth for the coderanch user
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!