mardi 14 avril 2015

Mining an image out of an acess database into a GridView

I'm building an ASP.Net web application that has an Microsoft Access database behind it. At the database, I have a table called items. one of it's columns is image - which is a visual representation of the item, which is a hyper link to an image on the database computer.


I have two questions:


First of all, is this a bad design? would you rather save the image itself on the database? If so, how would you do it?


The second one is, how can I represent an image saved this way in a gridView?


I've tried the following in C#;


Filling a dataset with an OleDbCommand:


SELECT ItemName as Name,ItemPicture as Picture...


And setting it as the source of the GridView, but sadly, it just wrote out the hyperlink in the grid: 1.jpg#1.jpg# instead of showing the image.


How would you do it?


Aucun commentaire:

Enregistrer un commentaire