• Post Reply Bookmark Topic Watch Topic
  • New Topic

String to Object conversion & vice-versa  RSS feed

 
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I want to convert an object into string to store it in databse as varchar. Also when I retrieve this string from database, I should be able to get the same object i.e string to object conversion should be possible. Has anyone done this? Please share your ideas....

Thanks in advance.
 
Ranch Hand
Posts: 131
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How about serializing the Object in a String?

P.
 
Ranch Hand
Posts: 1608
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Serialize the object to a blob (java.sql.Blob) or use an O-R Mapping tool such as Hibernate.
 
Jugnu Gupta
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
example, if I have to convert an array of Integer to string....The ava data types implement serializable...so i should be able to do it.How?
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!