ASP Photo Gallery This sample illustrates how to publish a basic photo gallery on an IIS or PWS web-server.Images are stored in the database tables and administered using Access forms.
It builds on the ASP Image Database Publishing sample. See the documentation on this sample for more details of the basic principles involved.
You could use this approach either to update the live database (if the web server is locally accessible), or update the database locally then upload it to the web server. Alternatively you could generate static html and image files from an offline version of the website - these could then be uploaded to any kind of web server (eg with ftp synchronizing software).
Note that publishing images directly from the database in this way is generally not recommended unless the userbase is fairly limited, or if suitably scalable systems and techniques are used to handle the load. Alternatively you can work entirely with external image files - see the sample gallery for samples using this approach.
DBPix Image Control version 1.0 or later (18.104.22.168 or later recommended).
IIS 4.0 or later or PWS
Any web browser
Access 97 or later (for administration forms - convert to your current Access version if necessary)
Suitable database connection such as MDAC/OLE DB drivers or ODBC (MDAC 2.6 or later with OLE DB 4.0 recommended)
Unzip the file into a new folder on your IIS web server ensuring that the directory structure is reproduced.
Ensure that the IIS configuration allows script access to the top-level folder.
If your system supports the "Microsoft.Jet.OLEDB.4.0" provider (as installed by MDAC 2.5) then no further configuration is necessary. Otherwise edit the 'config.asp' file located in the top-level folder and update the connection string as indicated in the file. If necessary you may need to set up an ODBC connection. For more information on configuring connection strings there are several excellent resources listed on the links page at www.ammara.com
Connect to your web-server at the url corresponding to where you installed the files and select a catalogue to view (there's only one in the initial download).
When the catalgue is displayed, click a thumbnail to see a larger image.
Open the photos.mdb file on the webserver. 2 forms are available: 'catalogs' for adding, editing and deleting catalogues, and 'photos' for adding, editing and deleting photos within a catalog.
The functionality is the same as for the ASPPublish sample. See the source code links above and the ASPPublish sample documentation for more detailed technical coverage.
Files & Code
|File / module|| ||Description|| || |
|default.asp|| ||Displays a list of catalogues for the user to select from|| ||View Code|
|catalogue_.asp|| ||Displays the contents (images) of a specific catalogue|| ||View Code|
|image_.asp|| ||Server script to return the detail image from the database|| ||View Code|
|thumb_.asp|| ||Server script to return the thumbnail image from the database|| ||View Code|
|detail_.asp|| ||Popup page which displays the main image for a specific record from the database|| ||View Code|
|config.inc|| ||Configuration file containing connection strings and settings|| ||View Code|
|adovbs.inc|| ||ADO constants include file for VBScript|| ||View Code|
|photos.mdb|| ||Database containing the images, catalogues and administration forms|| || |
|images/*|| ||Image files used in the sample site HTML|| || |