0

I am using sqlparameter to insert value in to the table through procedure i have a prameter in procedure of type image in c# i set the parameter type as DbType.Binary now i want to pass Null value to the parameter if i use DBNull.value, i get incompatible data type error

1
  • What happens if you set it to a CLR null? Commented Aug 21, 2009 at 8:46

1 Answer 1

2

Try like this int the sp set parametar default value null like this @parametar Binary = NULL and then in the code test if the value is null and if it is null just don't pass parameter to the sp and it will take default value null.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.