Click here to Skip to main content
15,884,099 members
Please Sign up or sign in to vote.
4.00/5 (1 vote)
Hi ppl!

I currently wanna make a database to store images and then display them all out in a listview.

But somehow i am unable to store them and as well as show them out in images.
I store them as URI already

following is the code in the db class.
C#
private Uri cardImage;
        [Column]
        public Uri CardImage
        {
            get
            {
                return cardImage;
            }
            set
            {
                if (cardImage != value)
                {
                    NotifyPropertyChanging("CardImage");
                    cardImage = value;
                    NotifyPropertyChanged("CardImage");
                }
            }
        }

Any pointers??

Thanks
Posted
Updated 17-Apr-12 23:10pm
v2
Comments
Steve Maier 18-Apr-12 16:20pm    
Are you using a SQL CE database? or something else like one of the many NoSQL databases?
xbolslock 18-Apr-12 21:10pm    
hi. i followed the coding on the web.
Its a local database using Isolated Storage
The link is http://www.jeffblankenburg.com/2011/11/30/31-days-of-mango-day-30-local-database/
ashok rathore 20-Jun-12 4:36am    
Hi,

How we can show image from database in image control in Windows Phone 7 control.

I applied the code:

try
{
var data = (byte[])value;

using (var stream = new MemoryStream(data))
{
var source=new BitmapImage();
source.SetSource(stream);

return source;
}

}
catch (Exception ex)
{

throw ex;
}


But I gets error"Unspecified error"

How can I resolve it

I followed this link:"http://www.dotnetcurry.com/ShowArticle.aspx?ID=585"

Thanks
xbolslock 20-Jun-12 4:51am    
oh thanks! =)

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900