Displaying an image from a database is a two part process - 1 to display the page that hosts the image and 2 to actually read and display the image. This can't happen on the same URL request because images are actually served separately from the HTML.
Hence you need two (or more depending how many images you dynamically serve) requests to actually handle the image. The code link from michael shows you how to read the data from the database - you can then serve that with Response.BinaryWrite() and the appropriate content type header as a separate request from teh HTML.
Personally I cannot think of a single reason why anyone would store images in a database - it's more work to maintain there, more work to retrieve and consumes extra resources. You're typically much better off putting an image path into the database and then pointing at the image on disk.
+++ Rick ---