Solved

Retrieve image from SQL Server

Posted on 2011-02-16
4
868 Views
Last Modified: 2013-12-17
Retrieve image [byte] from SQL Server then store it to ad rotator or an image control?
any help or suggestion is greatly appreciated...

I am using ASP.NET... not windows form...
0
Comment
Question by:PagodNaUtak
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
4 Comments
 
LVL 4

Accepted Solution

by:
ong-hh earned 500 total points
ID: 34913187

http://www.codeproject.com/KB/database/ImageSaveInDataBase.aspx
http://social.msdn.microsoft.com/Forums/en/adodotnetdataproviders/thread/deb976d4-0678-4411-8e76-be2a7f5f280b

Example:
// imageData retrieve from SQL Server
                byte[] imageData = GetBytesFromUrl("http://student.kfupm.edu.sa/s200354630/Multi/images/o-png8.png");
                MemoryStream stream = new MemoryStream(imageData);

                System.Drawing.Image img = System.Drawing.Image.FromStream(stream);

                Response.Clear();
                Response.ContentType = "image/jpg";
                img.Save(Response.OutputStream, ImageFormat.Jpeg);
                img.Dispose();
0
 
LVL 8

Author Comment

by:PagodNaUtak
ID: 34913455
is there away to use add rotator?
0

Featured Post

Learn by Doing. Anytime. Anywhere.

Do you like to learn by doing?
Our labs and exercises give you the chance to do just that: Learn by performing actions on real environments.

Hands-on, scenario-based labs give you experience on real environments provided by us so you don't have to worry about breaking anything.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Many of us here at EE write code. Many of us write exceptional code; just as many of us write exception-prone code. As we all should know, exceptions are a mechanism for handling errors which are typically out of our control. From database errors, t…
A long time ago (May 2011), I have written an article showing you how to create a DLL using Visual Studio 2005 to be hosted in SQL Server 2005. That was valid at that time and it is still valid if you are still using these versions. You can still re…
Come and listen to Percona CEO Peter Zaitsev discuss what’s new in Percona open source software, including Percona Server for MySQL (https://www.percona.com/software/mysql-database/percona-server) and MongoDB (https://www.percona.com/software/mongo-…
Add bar graphs to Access queries using Unicode block characters. Graphs appear on every record in the color you want. Give life to numbers. Hopes this gives you ideas on visualizing your data in new ways ~ Create a calculated field in a query: …

696 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question