473,473 Members | 1,838 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Download a file from a database

Can anyone point me to any good articles or examples of delivering a
binary file to the user from a database?
I need to pull a PDF file from a SQL Server image field and send it back
to the browser. I'm not sure if there is already an established "best
way" to do this so I thought I'd ask. I don't want to get too far down
the wrong path. Thanks!

Matt
Nov 19 '05 #1
4 1402
Hi Matt,

Is this what you're after?

HOW TO: Read and Write BLOB Data by Using ADO.NET Through ASP.NET

http://support.microsoft.com/default...b;en-us;326502

Ken
Microsoft MVP [ASP.NET]

"MattB" <so********@yahoo.com> wrote in message
news:3d*************@individual.net...
Can anyone point me to any good articles or examples of delivering a
binary file to the user from a database?
I need to pull a PDF file from a SQL Server image field and send it back
to the browser. I'm not sure if there is already an established "best way"
to do this so I thought I'd ask. I don't want to get too far down the
wrong path. Thanks!

Matt

Nov 19 '05 #2
Yes, this article shows you how to download files from a SQL Server
database.
It also shows you how to allow users to upload files into the database.

http://SteveOrr.net/articles/EasyUploads.aspx

--
I hope this helps,
Steve C. Orr, MCSD, MVP
http://SteveOrr.net
"Ken Cox [Microsoft MVP]" <BA************@sympatico.ca> wrote in message
news:e0**************@TK2MSFTNGP12.phx.gbl...
Hi Matt,

Is this what you're after?

HOW TO: Read and Write BLOB Data by Using ADO.NET Through ASP.NET

http://support.microsoft.com/default...b;en-us;326502

Ken
Microsoft MVP [ASP.NET]

"MattB" <so********@yahoo.com> wrote in message
news:3d*************@individual.net...
Can anyone point me to any good articles or examples of delivering a
binary file to the user from a database?
I need to pull a PDF file from a SQL Server image field and send it back
to the browser. I'm not sure if there is already an established "best
way" to do this so I thought I'd ask. I don't want to get too far down
the wrong path. Thanks!

Matt


Nov 19 '05 #3
The ASP code was....

Response.ContentType = "application/pdf"
Response.BinaryWrite dr("Fieldname")
Response.end

I presume it would be about the same in .NET..

"MattB" wrote:
Can anyone point me to any good articles or examples of delivering a
binary file to the user from a database?
I need to pull a PDF file from a SQL Server image field and send it back
to the browser. I'm not sure if there is already an established "best
way" to do this so I thought I'd ask. I don't want to get too far down
the wrong path. Thanks!

Matt

Nov 19 '05 #4
' The ASP code was as follows
Response.ContentType = "application/pdf"
Response.BinaryWrite dr("Fieldname")
Response.end

I presume it will be about the same in .NET..

"MattB" wrote:
Can anyone point me to any good articles or examples of delivering a
binary file to the user from a database?
I need to pull a PDF file from a SQL Server image field and send it back
to the browser. I'm not sure if there is already an established "best
way" to do this so I thought I'd ask. I don't want to get too far down
the wrong path. Thanks!

Matt

Nov 19 '05 #5

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

Similar topics

6
by: Samir | last post by:
Hello, I have a website that is hosted by another company. Is there some kind of php script to limit downloading to a certain amount size? And is there kind thing I can do to the .htaccess...
3
by: Matthew Moran | last post by:
I am creating a series of downloadable articles, career tools, spreadsheets, etc. However, some of the content is for "registered" guest. The registrants are stored in a database and logon. I...
8
by: IGC | last post by:
I have a requirement to record in a database when a file is finished downloading to the end-user. Currently when a user clicks a download icon for a file it directs to an ASP page that records the...
14
by: Aaron | last post by:
On my website I have a dynamic link(aspx) to this file 0AX120S.jpg(privacy protection). When a visitor clicks on the link I want them to see my_vacation_pic.jpg (fetch realname from database) is...
3
by: skyetech | last post by:
We're creating a file sharing area in our intranet. When a user clicks on a link they can save the file to their computer. When the file is done downloading and the 'File Download' dialog closes I...
0
by: Buddy Ackerman | last post by:
I am trying to implment a file download via a link such that when clicked, instead of starting the default application for that type of file the user will be presented with a download dialog...
4
by: abhanjee | last post by:
Hello, I am a newbie and am developing an application for work. I have figured out how to upload a file attachment to the SQL database and download the same file using C# and Visual Studio....
2
by: Jobs | last post by:
Download the JAVA , .NET and SQL Server interview with answers Download the JAVA , .NET and SQL Server interview sheet and rate yourself. This will help you judge yourself are you really worth of...
2
by: =?Utf-8?B?SHVzYW0=?= | last post by:
Hi EveryBody: I'm working with project in my company by using ASP.Net 2.0 that allow the users to upload and download files to web site in the internet as backup. The user will first upload his...
1
KevinADC
by: KevinADC | last post by:
Note: You may skip to the end of the article if all you want is the perl code. Introduction Many websites have a form or a link you can use to download a file. You click a form button or click...
0
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
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...
1
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...
0
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
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
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
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...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
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 ...

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.