Subject: Gridview & DetailsView Database Image Issue
Posted By: ayadrocks Post Date: 12/25/2005 8:09:44 AM
Hi there

I got problem to view a database image with GRIDVIEW and DETAILSVIEW Controls. I using particullarly Northwind database from emaployees table to reteive the photos (Photot Field) but it never worked, it always gives me red x in the photo frame when i browse it. The way i did i dropped both controls, bind them with sqldatasource add column with imgfield which should show the database image.i tried it with many setting with no luck i would really appreciated if u Could offer me a help regarding this issue. (URGENT PLS)

 

Best Regards

Eric


Reply By: Imar Reply Date: 12/27/2005 4:50:46 PM
The Northwind database and urgency in the same post. Hmmmm. Interesting.

If I am not mistaken the Northwind stores the images as BLOBs, not as paths to the images. So, to make this wok, you'll need a separate page that displays the image.

E.g. <img src="/ShowImage.aspx?Id=123" /> points to ShowImage.aspx and passes it an ID of an employee. That page should then access the database, get the BLOB from the database and write out the image.

Search Google for "store image "SQL Server" retrieve" and you'll get plenty of useful hits.

HtH,

Imar
---------------------------------------
Imar Spaanjaars
Everyone is unique, except for me.

Go to topic 37939

Return to index page 409
Return to index page 408
Return to index page 407
Return to index page 406
Return to index page 405
Return to index page 404
Return to index page 403
Return to index page 402
Return to index page 401
Return to index page 400