|
-
Nov 24th, 2000, 02:10 AM
#1
Thread Starter
Addicted Member
Hello everyone,
I am having problems in showing a pdf file from ASP.
Ihave a component that queries a database where the pdf file is.
Then I call the method from ASP as follows:
Code:
<%
Dim KategoriID, rs, objVarer
Response.Expires = 0
Response.Buffer = TRUE
KategoriID=1030108
set objVarer = Server.CreateObject("VarerOnline.HentVarer")
set rs = Server.CreateObject("ADODB.Recordset")
set rs = objVarer.HentPdfFil(Clng(KategoriID))
if not rs.EOF then
Response.ContentType = "application/pdf"
Response.BinaryWrite rs.Fields("PdfFil")
end if
%>
I have something in my recordset, but the page fails at the line Response.BinaryWrite rs.Fields("PdfFil") with a type mismatch error.
Do you know how to solve this? ressources where I can find help? I've searched and searched but found nothing.
Please help,
Thanks in advance,
André
-
Nov 24th, 2000, 09:31 PM
#2
Conquistador
have you ever seen it done b 4?
-
Nov 25th, 2000, 10:12 AM
#3
Thread Starter
Addicted Member
-
Nov 25th, 2000, 10:48 AM
#4
Monday Morning Lunatic
Try using rs.Fields("PdfFil").Value
I refuse to tie my hands behind my back and hear somebody say "Bend Over, Boy, Because You Have It Coming To You".
-- Linus Torvalds
-
Nov 26th, 2000, 04:16 AM
#5
Conquistador
or even just rs("PdfFil")
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|