Get Help:Ask a Question in our Forums|Report a Bug|More Help Resources
Last post May 04, 2012 01:00 PM by jozolo
Mar 07, 2007 01:52 PM|LINK
I had this issue a while back, but didn’t find a solution. When opening pdf stored in SQLSVR from any browser, this error occurs:
“There was an error opening this document. The file is damaged and could not be repaired.”
Doc & rtf work. I’m using ASP.net 2005, framework 2x.
Document is being uploaded via FileUpload & btnClick event to pass
FileType, FileSize, FileContent to business layer/sp. The document is same size locally & in SQLSVR, so I don’t think it’s being truncated.
Download occurs when user clicks hyperlinkfield to view document in any browser. It’s during this time that pdf fails to open.
Any suggestions … ?
Mar 07, 2007 03:29 PM|LINK
We need to check your code in order to track it.
please post your code which is handling the file download
Mar 08, 2007 05:52 PM|LINK
Sorry for not replying sooner. EM notification not working from forum? I will check that shortly.
Thank you in advance for prompt professional reply, as always from this forum. MS ROCKS!!
______default.aspx.vb code (click link, get document)
If Request.QueryString("OrderID") <>
'qs present & no issue
aSplitQS = qsOrderIDControlNum.Split(","c)
aSplitControlNumName = aSplitQS(1).Split("="c)
result = clsOrder.LoadDocument(OrderId) 'sp that retrieves document from SQLSVR
.ContentType = clsOrder.ContentType
.OutputStream.Write(clsOrder.FileData, 0, clsOrder.FileSize)
______Order class LoadDocument method
mOrderID = OrderID
ds = DLLR.DataAccess.ExecuteDataset(Data.CommandType.StoredProcedure,
______ Order class variables
Mar 09, 2007 01:00 PM|LINK
Any suggestions .... EM is working.
Mar 09, 2007 01:49 PM|LINK
Adobe diagnostic link
Still researching ...
Mar 09, 2007 03:27 PM|LINK
Having server checked. Let you know after reconfigured.
Mar 09, 2007 06:39 PM|LINK
Troubleshot via Adobe's checklist ... no luck
Open IIS Manager, then navigate to APPL.
Right click APPL, properties.
Under HTTP headers, file types, add a new type.
For MIME type dialog box, please enter
For MIME type text box, please enter
Dunno ... must be code issue ...
I believe that Adobe, browser & server have been eliminated as causes.
Mar 09, 2007 06:47 PM|LINK
Does anybody know if there were a specific way that pdf's must be stored in DB?
Oct 17, 2007 07:16 PM|LINK
I had the same problem
The pdf I imported to database by using openrowset()
May 06, 2008 02:08 PM|LINK