[thelist] RE: Inserting PDF from SQL Server into web page
Miller, Bart
MillerB at bek.com
Wed Jul 19 15:26:01 CDT 2000
Disregard this...our server had to be rebooted for reasons unrelated to this
and now the PDF displays properly. Apparently the code is correct.
-----Original Message-----
>Subject: Inserting PDF from SQL Server into web page
>I am using the following code attempting to read PDF data from SQL Server
and write it out to a web page:
><% Response.ContentType = "application/pdf" %>
><!--#include virtual="ADO_connect.asp"-->
><%
>Response.Buffer = True
>Query = "SELECT pdf FROM table1 WHERE id = " & chr(39) &
Request.QueryString ("pdf_id") & chr(39)
>Set RS=MyConn.Execute(Query)
>Response.BinaryWrite RS("pdf")
>%>
>But all I get is a page full of garbage -- however it does appear to
contain data from the PDF file. Any ASP gurus >want to take a stab at this?
More information about the thelist
mailing list