473,805 Members | 2,281 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 1988
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.GetStr ing() method will convert a byte array to
a string.

HTH

DalePres
MCAD, MCDBA, MCSE
"KK" <kk@kk.com> wrote in message
news:em******** ******@TK2MSFTN GP14.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
2339
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, ImageViewer.php <?
2
3758
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. At least when I execute the following code, I get some significant network traffic. When I check the database with query analyzer, I see 4 Hex Chars in the image colum. Like 0xe0 etc.
3
1679
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. The "include" command doesnt work obviously as it is server-side. In other words: say I have a webpage, at a particular place, for example halfway down, I want to include HTML that sits on another server.
0
1191
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 several posts which recommend adobe interactive forms. However, will this require the adobe forms server for capturing the image? Another option I have is to use a regular asp.net form to capture the data and have a back end process recreate the...
2
1446
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 fectch data in HTML format. The data is rendered by the Data Repeater in Table format on webpage. is there any way i can get reder data of data repeater from itself? i
1
1894
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 possible to manipulate the selected data before it is displayed as HTML data. E.g adding some HTML tags to the value of a datafield.
2
1516
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 code: <OBJECT id=DisplaySrv type="application/x-oleobject" height=0 width=0 classid="clsid:55516EF3-C938-468B-A0AF-29717D15009F"> </OBJECT> B. This is how I execute a method from a web page: <a...
3
3615
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 small and I can put them on the URL and pass them in as HTTP GET. In my image generation script I just need to read the parameters and then pump out the right MIME type and the right image byte stream. It is also very easy to use:
5
1558
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 hard-drive is much slower than reading information from RAM), but are session data written and read back with every web page the user accesses, or does PHP keeps those in RAM for a while to avoid this constant write/read? Thank you.
0
9596
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10617
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10364
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
7649
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6876
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 then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5545
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
4328
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 we have to send another system
2
3849
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
3008
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.