serializing object to db

  • Thread starter Thread starter Karl
  • Start date Start date
K

Karl

Hi,

Using C# and I need to instantiate an object and then
serialize it and save it to a database.

I have declared my class and used the [Serializable] tags
etc.

I am using FileStream and BinaryFormatter to serialize ok
but when I come to save to the db I get an error saying I
need to implement IConvertable.

Please help.
 
Hi,

Using C# and I need to instantiate an object and then
serialize it and save it to a database.

I have declared my class and used the [Serializable] tags
etc.

I am using FileStream and BinaryFormatter to serialize ok
but when I come to save to the db I get an error saying I
need to implement IConvertable.

Please help.

You could save the pain and try using an object/relational persistence
mechanism.

There are a few listed at http://jcframework.sourceforge.net/links.html


--
Regards,
Richard

http://jcframework.sourceforge.net
(Open Source Object Relational Persistence for .NET and VB6)
 
Hi Karl,

Code?
If you have successfuly serialized them, just store those byte[] arrays into
blob fields.
 
Back
Top