Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Blob size limit?

Status
Not open for further replies.
Oct 25, 2007
4
US
I have a asp.net app that allows users to attach supporting documents to a record. The document image is loaded into SQL Server 2000. The users attach Excel, txt, jpegs, etc, including pdfs.

The table looks like:

Col Name Data Type Length Allow Nulls
DocumentID int 4 0
Description nvarchar 500 1
ContentSize int 4 1
ContentType nvarchar 50 1
Content image 16 1

Today a user was unable to attach any of several pdf files. They varied in size from approx. 14k to 20k. Thinking this might be a problem with pdfs, per se, I tried another pdf and was able to attach one of 4k. So maybe the problem is with the size...

How large a document can be stored in an Image field of length "16"? SQL does not allow me to make this column larger.

Any suggestions?
 
The image data type is limited to 2,147,483,647 bytes (2 gigabytes).

>> So maybe the problem is with the size...
Nope.

>> asp.net app that allows users to attach supporting documents
I would suggest that you look in to timeout issues. Better yet, ask your question in the ASP.Net forum. This time, post the exact error message that you are getting.

Good luck.

-George

"The great things about standards is that there are so many to choose from." - Fortune Cookie Wisdom
 
Are you aware that updating blob columns requires special coding? In ADO you have to use AppendChunk and other methods to do the job. Each chunk must be <= 8000 bytes in size. Do some searches on GetChunk and AppendChunk and you'll see what I mean. It's possible that your application is trying to use the normal "Recordset.Fields(x).Value = String" syntax which is going to only use the first 8000 characters or fail completely.
 
Thank you both for your responses. The error was:

"Internet Explorer cannot display the webpage"

Using breakpoints I found that the app doesn't even get to the page load for the postback. But, as I said, the code works fine for other documents. Now that I know this isn't a size issue, I agree you're right: a better forum would be one devoted to asp.net.
 
I found my answer on another forum: it was, indeed, a size issue.

I added:
<httpRuntime maxRequestLength="102400" executionTimeout="360"/>

to my web.config file and I was able to upload a 20Meg pdf file with no problems.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top