473,320 Members | 2,164 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

Converting html data written as a Image (In Sql Server) back to html ?

KK
Hi,

I need to save certain content to SQL server and then
use SQL Server indexing facility to search. SQL Server
have recomended using Image data type with a filter
type (for .htm, .doc etc..)

Now, because of this I save normal html content also
in binary format in the Image field.

When reading, i read the data to a byte array. Now
I want to convert this to a string and save or display.

How do I do that? What is the class I should use to
convert the byte array to a string?
rgds
KK
Nov 16 '05 #1
1 1913
I am curious why you used a blob rather than a varbinary type? varbinary
will handle up to 8000 characters of HTML. That's a lot of HTML.

In either case, the Encoding.GetString() method will convert a byte array to
a string.

HTH

DalePres
MCAD, MCDBA, MCSE
"KK" <kk@kk.com> wrote in message
news:em**************@TK2MSFTNGP14.phx.gbl...
Hi,

I need to save certain content to SQL server and then
use SQL Server indexing facility to search. SQL Server
have recomended using Image data type with a filter
type (for .htm, .doc etc..)

Now, because of this I save normal html content also
in binary format in the Image field.

When reading, i read the data to a byte array. Now
I want to convert this to a string and save or display.

How do I do that? What is the class I should use to
convert the byte array to a string?
rgds
KK

Nov 16 '05 #2

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

Similar topics

3
by: Rithish | last post by:
I have a set of images on a server. I want to pick these from the database without creating a temporary file on the server; and also have some text alongwith it. Something like, ...
2
by: Chucker | last post by:
Hi Community, I think I can store Binary Data in SQL Server but when I try to retrieve it, I always only get one byte. I think I stored my Binary Data in SQL Server in a Colum of Type Image....
3
by: indessen | last post by:
Hi, got the following problem: I need to include an HTML file that sits on another server B in an HTML file that sits on server A, and I need to include this at a particular place in the file....
0
by: subirose | last post by:
Hi, For my web application I need to create an html input form form which I need to extract the entered data and also save the filled form as an image when the user submits the form. I have seen...
2
by: Lucky | last post by:
hi guys! i've got very interesting problem. it is like this. is it possible to get HTML generated by the server control in code behind? i'm developing an asp.net web application where i need to...
1
by: Tor Inge Rislaa | last post by:
Adding HTML tags to data from SQL server When dragging a table on to a web form in an ASP.NET 2.0 application, the connection is established and the data is displayed in a DataGrid. Is it...
2
ravioliman
by: ravioliman | last post by:
I have written a Delphi single threaded, out-of-process (exe) automation server that I want to execute methods from a HTML page. A. I have been able to launch the server with the following...
3
by: computer_guy | last post by:
Hi Everyone, I run into a problem. I am trying to write an aspx that can dynamically generate an image based on some input parameters. Things are very simple if the size of the parameters is...
5
by: Gilles Ganault | last post by:
Hello Out of curiosity, I was wondering what happens with session data: I read that session data are saved on disk as eg. /var/sess_ID (which is already a performance issue since accessing a...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

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.