473,769 Members | 2,078 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 1337
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.Conten tType = "octet/stream";
EnableViewState = false;
Response.Charse t = "";
Response.AddHea der("Content-Disposition", "attachment;fil ename=wordfile. doc");
Response.Binary Write(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
1386
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 (kind of sentences, with the space for the address blank for example). The user will choose the correct address from another table in the database. At this point I would like to generate a Word document with the formatted text including the right...
2
1942
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 like the secretary at a school to update a Word document concerning homework assignments. This Word document would reside on the server. When changes are made it, these changes are automatically updated to the web page. This would simplify life...
4
1745
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: ***************************************************************** <%@ Import Namespace="System.Data.SqlClient" %> <%@ import Namespace="System.IO" %> <Script Runat="Server">
0
1081
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 the document via a hyperlink after reading the following.... http://www.experts-exchange.com/Web/Web_Languages/ASP/Q_20245636.html?query=Cannot+activate+application+word&clearTAFilter=true However I also want to use the OLE automation for...
4
2513
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 Interop Assemblies (PIAs) for automating Word on the server and everything runs smoothly on the server console. The word documents are generated perfectly from all clients and stored on the server with some data comes from a SQL server and/or stores...
7
2060
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 try, it acts like the link is not even on the image. What is the proper way to do this? Thanks.
1
1108
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 1.1? need guidance....
6
4643
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 doesn't wrap the text in textarea. the result is one very veyr long string of text which stretch MS word all
9
46767
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 for component with CLSID {000209FF-0000-0000-C000-000000000046} failed due to the following error: 80070005.
0
9579
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10208
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...
1
9987
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8867
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7404
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
5294
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...
0
5444
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3952
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
3
2812
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.