title: Issue in updating a sql server `varbinary` column using C#
body: <p>When I code an insert, everything works great. For example:</p>
  
  <pre><code>dataCommand.CommandText = "use mydb; INSERT INTO mytable VALUES(@binaryvalue);
  dataCommand.Parameters.Add("@binaryvalue", SqlDbType.VarBinary, 256).Value = mycard;
  dataCommand.ExecuteNonQuery();
  </code></pre>
  
  <p>However, if I try to update, it won't work. I used the .WRITE method, but it won't do:</p>
  
  <pre><code>dataCommand.CommandText = "use mydb; update mytable set mycolumn .Write(@binaryvalue, 0, NULL) where myid = " + wid;
  dataCommand.Parameters.Add("@binaryvalue", SqlDbType.VarBinary, 256).Value = mycard;
  dataCommand.ExecuteNonQuery();
  </code></pre>
  
  <p>How can I perform an update instead of deleting/inserting?</p>
  
  <p>Thanks for any response!</p>