how to use images with your database
Access or other databases let you store images. but it is not as straight forward as you might wish to retrieve them for the web. it can be done, theoretically. you find descriptions at pulling images form an Access DB or pulling images from a database on http://www.asptoday.com. but it would involve defining the MIME type of the image data properly and you would have to make this dynamic if you want to mix GIFs and JPEGs. a much easier solution is to store the images not in the database but externally on your website and take advantage of the fact that HTML is pure text, containing only links to images. an image embedded in a HTML code would look e.g. like the following: <img src="myFolder/myImage.gif" width="324" height="83"> to make it dynamic you could replace the src string with ASP like the following: <img src="<%=(Recordset1.Fields.Item("img").Value)%>" width="324" height="83"> "myFolder/myImage.gif" (or however the correct path would look like) would be what you would have to store in the appropriate field in the database. if you look up the "Franchise" table in the scaalcoffe.mdb you will find a column that does this for the tutorial examples. Ultradev offers a very easy
way to apply this:
|