P
Peter Afonin
Hello,
I have Word documents stored in the Oracle database in the BLOB field
that I need to retrieve. I've found the way of doing it:
While dr.Read
sName = dr("TE_PM_ATTACH_NAME")
bLob = dr.GetOracleLob(1)
Response.AppendHeader("Content-type:",
"application/force-download")
Response.AppendHeader("Content-Disposition", "attachment;
filename=" & sName)
Response.AppendHeader("Content-Length", bLob.Length)
Response.Charset = "UTF-8"
' write the blob data - this will begin to force the
download
Response.BinaryWrite(bLob.Value)
End While
The only problem here is that when the customer is trying to open the
document, in most cases (but not always, which is weird) he gets
message like this:
This file could not be found.
Try one or more of the following:
* Check the spelling of the name of the document.
* Try a different file name.
(C:\...\Accessing BLOB data 2[1].doc)
So he can only download this document.
If it's an image file instead of word document - there are no problems.
I would appreciate any suggestions on how to deal with this.
Thank you,
Peter
I have Word documents stored in the Oracle database in the BLOB field
that I need to retrieve. I've found the way of doing it:
While dr.Read
sName = dr("TE_PM_ATTACH_NAME")
bLob = dr.GetOracleLob(1)
Response.AppendHeader("Content-type:",
"application/force-download")
Response.AppendHeader("Content-Disposition", "attachment;
filename=" & sName)
Response.AppendHeader("Content-Length", bLob.Length)
Response.Charset = "UTF-8"
' write the blob data - this will begin to force the
download
Response.BinaryWrite(bLob.Value)
End While
The only problem here is that when the customer is trying to open the
document, in most cases (but not always, which is weird) he gets
message like this:
This file could not be found.
Try one or more of the following:
* Check the spelling of the name of the document.
* Try a different file name.
(C:\...\Accessing BLOB data 2[1].doc)
So he can only download this document.
If it's an image file instead of word document - there are no problems.
I would appreciate any suggestions on how to deal with this.
Thank you,
Peter