First of all I\'ve tried everything, and can\'t understand why it won\'t update my varbinary field properly.
out of 1728 bytes only the last byte in the byte array i
Your sql should be this:
UPDATE Invenotry
SET B = @B
WHERE A = @A
You can also try the full version of a parameter constructor:
SqlParamter param = new SqlParameter("@B", SqlDbType.VarBinary, 1728, ParameterDirection.Input,
// we have these parameters but they are ignored for input types
false, 0, 0, null, DataRowVersion.Current,
// the data
to_store);
cmd.Parameters.Add(param);