473,498 Members | 1,714 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Convert blob field or byte data to read in text box

i have a blob field in an sql server column field that stores html text. how
do i convert it so that it is readable in a text control. right now when i
convert using:

byte [] byteBlob = (byte[]) TMSFinding.Rows[0]["DetailedDescription"];

System.Text.ASCIIEncoding enc = new System.Text.ASCIIEncoding();

txtbxDetailedDescription.Text = enc.GetString(byteBlob);

right now it returns the text with the html tag info(<HTML>, <DIV>, etc.)
Nov 17 '05 #1
1 4706
Devhead,

Well, technically, the text is readable. However, you aren't going to
be able to display it in a textbox, because all of the markup is going to
get in the way. You should probably use the web browser control (which you
can add through the ActiveX tab when you add new items to the toolbox) and
then feed the string into that, and it should display correctly.

Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"Devhead" <de******@bellsouth.net> wrote in message
news:OT**************@TK2MSFTNGP14.phx.gbl...
i have a blob field in an sql server column field that stores html text.
how do i convert it so that it is readable in a text control. right now
when i convert using:

byte [] byteBlob = (byte[]) TMSFinding.Rows[0]["DetailedDescription"];

System.Text.ASCIIEncoding enc = new System.Text.ASCIIEncoding();

txtbxDetailedDescription.Text = enc.GetString(byteBlob);

right now it returns the text with the html tag info(<HTML>, <DIV>, etc.)

Nov 17 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
2201
by: Pierre-Benoit | last post by:
Hi there, I've a strange problem with ado.net and an Access db. I need to create a little C# app that take the content of "ole object" field and then save it into a file. The problem is that...
1
4437
by: Swarup | last post by:
I am reading a file (txt, xml, gif, ico, bmp etc) byte by byte and filling it into a byte arry. Now i have to convert it into a string to store it in the database. I use...
1
6502
by: sid_mulpuru | last post by:
I am trying to read data from a DB2 Blob Data type Field (using wsad 5.1.0) using getBlob() which when executed gives an SQL Exception 2005-01-07 15:48:40,506 ERROR - Error in...
4
2972
by: Luis | last post by:
Hi, I can a big problem... because I have a byte data = new byte, and I need to save this to a field on my MySQL database (here I have a BLOB field) but ¿can I save it? because if I put: Insert...
4
49513
by: Serge Klokov | last post by:
Hello! I have a Oracle table with a BLOB field. Each field is actually a simple text file of several lines. How to get this BLOB fields in readable format? I tryied something like...
2
6485
by: Vinciz | last post by:
hi guys... im new in java and i would love to learn some of these... basically i got a sample code to retrieve the blob from the mysql. however, i dont really know what to do with these...
6
4446
by: =?Utf-8?B?UHVjY2E=?= | last post by:
Hi, I'm using VS2005, .net 2 and C# for windows application. I need to convert a IntPtr to a byte to be able to add a meetingBlob data to the meeting class object in Active Directory schema. I...
55
24659
ADezii
by: ADezii | last post by:
Of all the questions asked here at TheScripts, the one which appears with the most frequency relates to the storing of Graphic Images within Access. There are basically three techniques available to...
0
10705
Debadatta Mishra
by: Debadatta Mishra | last post by:
Introduction In this article I will provide you an approach to manipulate an image file. This article gives you an insight into some tricks in java so that you can conceal sensitive information...
0
7125
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7002
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7165
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7205
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
7379
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
5462
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
4590
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
1419
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
656
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.