November 12, 2007 at 2:01 pm
I have a C# application, and I need to store an instance of a class object in a sql server 2005 database. For example:
myClass oMyClass = new myClass(args);
oMyClass.Property1 = something;
oMyClass.Property2 = another_thing;
At this point, I need to stick oMyClass in the database, so that I can get it out later, cast it back to myClass, and play with it some more. I tried to serialize the object to XML, but the class is not serializable, so I guess I am going to have to store it as a binary object. Does anyone have any sample code of doing this programmatically using C# and ADO.NET. Thanks.
Thomas
Viewing post 1 (of 1 total)
You must be logged in to reply to this topic. Login to reply
This website stores cookies on your computer.
These cookies are used to improve your website experience and provide more personalized services to you, both on this website and through other media.
To find out more about the cookies we use, see our Privacy Policy