I have sql data type image to store the state of the webparts but in .Net it is Byte[]. How do I convert Byte[] to sql image for insert and other operations.
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Just specify Binary as the parameter type, it’s value can be a
byte[]Edit: Also worth noting is that if you are using SQL Server 2005/2008, then you should use
VARBINARY(MAX)instead ofIMAGEsince the latter is deprecrated.