ネットランダム改変

はてなダイアリーからはてなブログにインポート。

PDFわからん、SSLわからん、ASPわからん

こんなのStreaming directly to an SSL encrypted stream - SharpDevelop Communityとか、こんなのjsajax.com - このウェブサイトは販売用です! -&nbspjsajax リソースおよび情報とか読んでるけど、ぜんぜんわからん!

<%
Response.Buffer = True
Response.ContentType = "application/pdf"

Set adcn = Server.CreateObject("ADODB.Connection")
Set adrs = Server.CreateObject("ADODB.Recordset")

adcn.Open "Provider=OraOLEDB.oracle;Data Source=hogedb;User ID=pdfuser;PassWord=****"

'DBからPDFを取得
adrs.Open "select pdf_data from pdf_tbl where pdf_id = " + pdf_id ,adcn ,0 ,1 ,1

size = adrs.Fields("pdf_data").ActualSize
pdf = adrs.Fields("pdf_data").GetChunk(size)

Response.BinaryWrite pdf
Response.Flush
Response.End
%>

PDFのサイズが大きいとき、Response.Endで止まっちゃってるのかな?

そもそも、バッファってなんで制御する必要があるの?IISが自動でやってくれるんじゃないの?