473,387 Members | 1,573 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,387 software developers and data experts.

Retrieving word docs stored in sql server?

Can some help me out retrieving word, pdf, etc. docs and streaming to the
browser?

I'm saving the docs as an image data type along with it's original filename
and retrieving them using a datareader but I'm not sure how to set the
headers properly (i.e Content-Length)

Articles on this using C# would be a big help. Thanks.
Jan 15 '06 #1
1 1320
Hi Dave,

Please look at following Url to read BLOB data from DB:

http://msdn.microsoft.com/library/de...omdatabase.asp
Then write data:

Response.ContentType = "octet/stream";
EnableViewState = false;
Response.Charset = "";
Response.AddHeader("Content-Disposition", "attachment;filename=wordfile.doc");
Response.BinaryWrite(outbyte);
Response.End();

HTH

Elton Wang
"Dave" wrote:
Can some help me out retrieving word, pdf, etc. docs and streaming to the
browser?

I'm saving the docs as an image data type along with it's original filename
and retrieving them using a datareader but I'm not sure how to set the
headers properly (i.e Content-Length)

Articles on this using C# would be a big help. Thanks.

Jan 16 '06 #2

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

Similar topics

5
by: cgia | last post by:
The question is very general, I know. I am reading a lot of info on the subject but can't really make up my mind on the way to attack this. I have portions of formatted text into the database...
2
by: KnotKnormal | last post by:
I would like to dynamically load a HTML page (or a Word document), which is embedded in a table when the user clicks on a hyperlink to go from HTML page one to HTML page two. For example, I would...
4
by: Thomas Scheiderich | last post by:
I can't seem to open a word document from any of my browsers except the one on my web server. Here is the .aspx file: ***************************************************************** <%@...
0
by: Luis Esteban Valencia Muñoz | last post by:
I am trying to access a word document, preferably on the client side in my intranet. The document is stored on the sever which is also a mapped network drive. I have been able to access and save...
4
by: Kash | last post by:
Hi everybody: I've developed a web application running on a 2003 server not on the web but on extranet environment of a small Firm (less than 10 users). I've taken benefit of Office Primary...
7
by: Sirplaya | last post by:
I am retrieving images that I stored in SQL Server on my web pages in C#. I have no problem with the images displaying, however, I am trying to wrap the image with an <A HREF ..." and each time I...
1
by: AVL | last post by:
Hi, I've a requirement in which I need to show a word document in the web page, allow the user to edit the document and then save the document ina particular location, How can I acheive in asp.net...
6
by: Eric Layman | last post by:
Hi, I have fields from textareas. With a click of a button, php is able to grab these fields and by using header(), convert the output to Ms Word doc. But the outcome of the word doc...
9
by: =?Utf-8?B?QmFkaXM=?= | last post by:
Hi, I'm using automation and it's working fine when I run it from my local machine. but if I try to access it from another machine it's giving me this Error: Retrieving the COM class factory...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
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,...

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.