Urgent Help required.. Inserting my Cutomized Java Class object in the database
posted 14 years ago
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!
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.