This topic is locked

Storing pictures in Access DB

7/6/2010 10:58:35 AM
ASPRunnerPro General questions
A
ac163601 author

Hi folks,

I have never stored pictures in an Access DB before, and am now having difficulties.
Can someone please help advise me on what is best, A: store the pictures inside Access, or B: store them in a separate folder. And could you help with an idiots guide on how to do it?
Also, I have tried to create a page using ASPRunner 6.0 to store the pictures in an OLEDB field, with an additional Thumbnail field, but I am receiving an error that IIS (I'm using 7.0 on Windows 7) will not allow files >200kb to be uploaded, but I can't find a setting for this in IIS Manager.
can anyone help on this?
Thanks

Shandy



I have now managed to store a picture inside the database, but the Thumbnail is showing as a full size picture despite setting the image size to 150*150 and selecting 'show thumbnail'.
there are now two questions left: how do i store pictures outside of the database, but allow users to link to them and how do I show thumbnails correctly.
thanks

A
ac163601 author 7/6/2010



Also, I have tried to create a page using ASPRunner 6.0 to store the pictures in an OLEDB field, with an additional Thumbnail field, but I am receiving an error that IIS (I'm using 7.0 on Windows 7) will not allow files >200kb to be uploaded, but I can't find a setting for this in IIS Manager.


[indent]here is the answer to this part:
Make sure the IIS web server is not restricting the size of ASP uploads. For example: IIS 6 (Windows Server 2003) has a limit of 200 KB for ASP requests in general and file uploads in particular. To remove this limit in IIS there are different instructions depending on your version of IIS.
For IIS 6:

  • Go to IIS and right click the server, select properties, and check the box "Allow changes to MetaBase configuration while IIS is running"; if after this step the metabase file is still locked, try turning off IIS or even restarting the machine in safe mode.
  • Open in a text editor the Metabase file, which can be found at c:\Windows\System32\Inetsrv\MetaBase.xml.
  • The variable AspMaxRequestEntityAllowed limits the number of bytes in the page request (by default 200KB); change the value to 1073741824 (unlimited) or to a limit of your choice.
  • Check whether the same variable shows up in other places in the file and change them too.
    For IIS 7:
  • Highlight your website, then open the "Advanced Settings..." link in the right-most panel. Set "ConnectionTime-out (seconds)" to a much bigger number. For example: "3600", which is an hour. Close "Advanced Settings...".
  • While still highlighting your website, click on the "ASP" tab, then expand "Limits Properties" and set "Maximum Requesting Entity Body Limit" to 1073741824.
  • Finally, open a command window as an administrator and run the command "c:\windows\system32\inetsrv\appcmd set config -section:requestFiltering -requestLimits.maxAllowedContentLength:100000000". This tells IIS the largest amount you may upload, in this case, it's 100MB. You may set your number accordingly. [/indent]

A
ann 7/7/2010

Shandy,
here is a discussion on where is the best place to store the pictures:

http://stackoverflow.com/questions/561447/store-pictures-as-files-or-in-the-database-for-a-web-app