When I try to insert a DBNull.Value in a faucet varbinary this exception (max.)
Thats my code: I know there are duplicate questions on the SO but I do not use any string like others do the use. Am I wrong? Update: Why not change your SQL: ... and Otherwise, try it in two rows I: If it is always a tap, then it will have an effect. Otherwise, check it in two rows:
Data type indirect conversion from nvarchar to varbinary (max) is not allowed Use this CONVERT function to run this query.
insertCMD.Parameters.AddWithValue ("@ ErrorScreenshot", SqlDbType.VarBinary) .Value = DBNull.Value;
<<>> <<>>
var Binary1 = insertCMD.Parameters.Add ("@usercrowshotshot", SqlDbType.VarBinary, -1); Binary 1 Value = DBNull.Value; Otherwise, in your original SQL insert statement, you are not defining the parameter type, but passing in varbinary, so error.
Comments
Post a Comment