|
|
|
|
|||||||||||||
Introduction
This article is a continuation of my previous article, which talks about
Inserting an image to Sql Server.
I would recommend to read the above article before continuing this. We will be learning the following aspects in this article.
Since we already have data in the table, Person, we will add some statements which retrieves all the rows from the table, person. The following code retrieves all rows from the table, Person. Code to retrieve image from sql server.
How it works?The above example is very very simple. All we are doing is executing a sql statement and looping through all the records. We are displaying only the Image from the table, Person. Before dispalying the image, we first set the contentType. Then we write the image to' the browser using the method, BinaryWrite Test this ScriptDownload the code
Click here to download the ASPX page ConclusionThus we saw how to retrieve images from a sql server. Do not forget to read my article which talks about inserting images to a sql server. Links
Inserting Image to SqlServer Send your comments to das@aspalliance.com Back to Article list | |||||||||||||||
| Copyright © 2000-2003 ASPAlliance.com Page Rendered at
11/21/2009 4:28:23 PM |
|||||||||||||||