aspose file tools*
The moose likes JDBC and the fly likes Urgent Help required.. Inserting my Cutomized Java Class object in the database Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » JDBC
Bookmark "Urgent Help required.. Inserting my Cutomized Java Class object in the database" Watch "Urgent Help required.. Inserting my Cutomized Java Class object in the database" New topic
Author

Urgent Help required.. Inserting my Cutomized Java Class object in the database

liinaa
Greenhorn

Joined: Sep 21, 2001
Posts: 5
I want to insert and retrieve a java class object into the database.Is this possible.Can setObject and getObject jdbc methods be used to achieve this and if so, what should be the corressponding datatype in the database.
If there's some other way, kindly pass on the information
Its urgent and any help would be appreciated
Thanks in advance!
David O'Meara
Rancher

Joined: Mar 06, 2001
Posts: 13459

"liinaa",
Javaranch has a Naming Policy to help promote a professional atmosphere.
You'll find that having a valid name also increases your chance of having your queries answered.
ta,
Dave.
David O'Meara
Rancher

Joined: Mar 06, 2001
Posts: 13459

I'm not aware of the set/getObject methods in JDBC, where are they?
You'll most likely store them as BLOBs in the database and have to read and write the objects as binary streams. You'll probably need to use the java.io.ObjectInputStream and ObjectOutputStream to move them around.
Can we get an idea on WHY you are storing classes in the database, sounds like a strange exercise...
Dave.
 
 
subject: Urgent Help required.. Inserting my Cutomized Java Class object in the database