[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

Downloading BLOB Files from MS SQL 2000 using ASP

Posted on 2006-11-29
5
Medium Priority
?
280 Views
Last Modified: 2010-08-05
I have a database table that looks like this

documentID                  Key Identifier
document_stored          BLOB
filename                       File Name
description                    Text File

I have created an ASP page that displays the documents that are available for download.

I would like to be able to click on the [filename] and be able to download (open or save) the file.  I do not want to have to save the file to the hard drive, because this is a shared account.

Pleas Help
0
Comment
Question by:cunninw
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
5 Comments
 
LVL 22

Accepted Solution

by:
WMIF earned 2000 total points
ID: 18041989
check out this question for some sample code:
http:Q_11502858.html
0
 

Author Comment

by:cunninw
ID: 18045046
I tried this solution, but I'm still getting an error.

Here is my code (the content type is application/pdf):

<%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%>
<!-- #include file="../connections.inc" -->
<%
DocID = Request.QueryString("fileID")
set RSDL = conn.execute ("SELECT * From BrokerSitez_Doc_Manager Where " _
& "documentID = '" & DocID & "'")

Response.ContentType =  RSDL("content_type")
Response.AddHeader "Content-Disposition", "inline;filename=" & RSDL("filename")
Response.BinaryWrite RSDL("document_stored")

%>

Here is the error (what the page is displaying):

 <font face="Arial" size=2>
<p>Response object</font> <font face="Arial" size=2>error 'ASP 0106 : 80020005'</font>
<p>
<font face="Arial" size=2>Type Mismatch</font>
<p>
<font face="Arial" size=2>/Prod/Owner/download.asp</font><font face="Arial" size=2>, line 11</font>
<p>
<font face="Arial" size=2>An unhandled data type was encountered.
</font>
0
 
LVL 22

Expert Comment

by:WMIF
ID: 18047028
which line is 11?  as i count, it points me to a blank line.
0
 

Author Comment

by:cunninw
ID: 18049483
Thanks WMIF.

I figured out the problem.  I was using * in the select statement instead of call each object by name.

Everything is working great now.

Thanks Again!
0
 
LVL 75

Expert Comment

by:Anthony Perkins
ID: 18050599
>>Everything is working great now.<<
Great!  Now please close the question.  Here's how:

What are my choices?
http://www.experts-exchange.com/Web/Web_Languages/ASP/help.jsp#hi67
0

Featured Post

Enroll in October's Free Course of the Month

Do you work with and analyze data? Enroll in October's Course of the Month for 7+ hours of SQL training, allowing you to quickly and efficiently store or retrieve data. It's free for Premium Members, Team Accounts, and Qualified Experts!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I recently decide that I needed a way to make my pages scream on the net.   While searching around how I can accomplish this I stumbled across a great article that stated "minimize the server requests." I got to thinking, hey, I use more than one…
Hello, all! I just recently started using Microsoft's IIS 7.5 within Windows 7, as I just downloaded and installed the 90 day trial of Windows 7. (Got to love Microsoft for allowing 90 days) The main reason for downloading and testing Windows 7 is t…
In this video, Percona Solution Engineer Dimitri Vanoverbeke discusses why you want to use at least three nodes in a database cluster. To discuss how Percona Consulting can help with your design and architecture needs for your database and infras…
In this video, Percona Solutions Engineer Barrett Chambers discusses some of the basic syntax differences between MySQL and MongoDB. To learn more check out our webinar on MongoDB administration for MySQL DBA: https://www.percona.com/resources/we…

649 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question