Click here to Skip to main content
15,892,537 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hello Friend's
I want to save and load picture in sql using class
i am successfully saved my picture in sql using class but how can i load my image for picture-box using class

please friend tell me ?
Posted
Comments
Manoj K Bhoir 29-Nov-11 1:24am    
Which class you are using?Please provide some code.
Sergey Alexandrovich Kryukov 29-Nov-11 1:28am    
This is irrelevant. This is just a garbage word by OP. Nearly everything is done "using class", the rest of it is done "using struct". There are no other containers for code. :-)
There is nothing unclear in the question this time.

I even answered :-)
--SA
kuldeepkumartak 29-Nov-11 1:53am    
public string name { get; set; }
public Image photo { get; set; }

this is class name customerdetail and customerdetail instance cd
another class i am working with sql connection

cd.name=dr["name"].ToString();
cd.image=????

Check this article[^]
 
Share this answer
 
Comments
kuldeepkumartak 29-Nov-11 1:31am    
Dear i am work in window application(desktop application)
Nickos_me 29-Nov-11 1:34am    
In your simple case you just use different contsrols and you needn't to think about difference:)
kuldeepkumartak 29-Nov-11 1:41am    
how can i use can you tell me with detail
kuldeepkumartak 29-Nov-11 1:53am    
code is this:


public string name { get; set; }
public Image photo { get; set; }

this is class name customerdetail and customerdetail instance cd
another class i am working with sql connection

cd.name=dr["name"].ToString();
cd.image=????
Please see these CodeProject articles:
C# Save and Load Image from Database[^],
Display Images from Database in ASP[^].

—SA
 
Share this answer
 
Comments
kuldeepkumartak 29-Nov-11 1:31am    
Dear i am work in window application(desktop application)
Sergey Alexandrovich Kryukov 2-Dec-11 18:20pm    
Desktop application? Sure. Both links are perfectly applicable. How saving and loading images depends on UI? Only showing images is different.
--SA
kuldeepkumartak 29-Nov-11 1:54am    
code is this :
public string name { get; set; }
public Image photo { get; set; }

this is class name customerdetail and customerdetail instance cd
another class i am working with sql connection

cd.name=dr["name"].ToString();
cd.image=????

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