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:
I have something in my recordset, but the page fails at the line Response.BinaryWrite rs.Fields("PdfFil") with a type mismatch error.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 %>
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é




Reply With Quote