BLOBS and VB.NET

L

lord.zoltar

Hello,
I am trying to store an object into a database as a binary object. The
database is SQL Server 2005, the progamming language is VB.NET 2005.
I've read that the way to do this is to input a hexadecimal
representation of the object. What I don't know is an easy way to
generate this representation.
The object in question is a TableLayoutContainer. Serializing the
object won't work, because it must be accessible across a network to
different users of this program.
 
L

lord.zoltar

Hello,
I am trying to store an object into a database as a binary object. The
database is SQL Server 2005, the progamming language is VB.NET 2005.
I've read that the way to do this is to input a hexadecimal
representation of the object. What I don't know is an easy way to
generate this representation.
The object in question is a TableLayoutContainer. Serializing the
object won't work, because it must be accessible across a network to
different users of this program.

Ok, I have a better handle on the problem now. I think what I need to
do is use a BinaryFormatter to serialize the TableLayoutPanel (earlier
I said Container, but that was a typo) to a MemoryStream. The problem
I've run into now is:

Dim serializer As New
System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
Dim objStream As New System.IO.MemoryStream
serializer.Serialize(objStream, criteriaPanel)

I get an error telling me that criteriaPanel (the tableLayoutPanel) is
not serializable. Is there any way I can make it serializable?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top