
October 27th, 2005, 04:53 PM
|
|
Registered User
|
|
Join Date: Oct 2005
Posts: 2
Time spent in forums: 19 m 16 sec
Reputation Power: 0
|
|
Issue extracting blob from mysql using ASP
i am only getting a fraction of a blob to output (1.47kb of a 998kb file) using response.binarywrite. any idea what may be causing the file to be truncated?
Jason C. Kelley
Code:
Dim strDSN
Dim intOptions
Dim strSQL
Dim adoRS
Dim objStream
Response.Expires = 0
Response.Buffer = false
intOptions = 1 + 2 + 8 + 32 + 2048 + 16384
strDSN = "DRIVER={MySQL ODBC 3.51 Driver};Server=localhost;" & _
"Port=3306;Database=db;Uid=id;Pwd=pw;option=" & intOptions & ";"
Set adoRS = Server.CreateObject("ADODB.Recordset")
adoRS.Open strSQL, strDSN, 2, 4
If Not adoRS.EOF Then
Response.AddHeader "content-disposition", _
"attachment; filename=recording.vox"
Response.ContentType = adoRS("call_type")
Response.BinaryWrite adoRS("call_recording")
End If
adoRS.Close
Response.End
|