Databinding against a BLOB column

G

Guest

I have a database table with a BLOB column where I want to store RTF data.
I have a typed dataset for my table.
I have a Windows Form with a RTF Editor Control which I want to databind
against my typed dataset via a Binding source.

Databinding a string property against a Byte Array column dosen't seem to
work.

Does anyone have an idea on how to solve this problem
 
G

Guest

Jörgen,
The most obvious way is to create a new property that you can bind against.
The sugestion I would make is to inherit the rich text control and add an
addition property like:
Public Property ByteData() as byte()
Get
return system.Text.Encoding.Unicode.GetBytes(<RTF Data>)
end get
set (Value as byte())
<RTF Data>=System.Text.Encoding.Unicode.GetString (<RTF Data>)
end set
End Property


HTH

Myles
 

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