Click here to Skip to main content
15,881,852 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
update image in sqlserver :

when i am using update command like this in SQLserver.

Update TableName set ImageCoumnName = @ImageData where ID = @ID
it updates the image but it is white and not the proper image.
Posted
Updated 4-Nov-11 20:38pm
v2
Comments
Prerak Patel 5-Nov-11 3:09am    
Share more code. What do you set in @ImageData?
koolprasad2003 5-Nov-11 3:24am    
Your ImageData may contain wrong image. what is your code
kartikadh 4-May-12 14:02pm    
hai.. can you post the code? i have same problem with you.. thx

 
Share this answer
 
v2
Comments
RaviRanjanKr 13-Nov-11 1:41am    
My 5+
P.Salini 13-Nov-11 23:45pm    
Thanks Ravi
thatraja 16-Nov-11 4:56am    
OT: You know GIT?
You didn't give us enough code.

Check this bunch How to save and retrieve Image in Database using Asp.net[^](It contains also interesting discussions too)
 
Share this answer
 
it is by using command parameters we can archive

System.Data.SqlClient.SqlParameter param1 = new System.Data.SqlClient.SqlParameter("@Pic3", SqlDbType.Image);
                        param1.Value = im3;
                        cmd.Parameters.Add(param1);



* im3 is a binary array
 
Share this answer
 
v2
Comments
RaviRanjanKr 12-Nov-11 14:11pm    
Always use "Pre" tag to wrap your code. :)
 
Share this answer
 
 
Share this answer
 
v2

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