سلام
با کد زیر کار update رکورد را انجام میدادم ولی فیلد code تغییر نمیکرد

private void btnUpdate_Click(object sender, EventArgs e)
{
int intposition;
SqlCommand objCommand = new SqlCommand();
intposition = objCurrencyManager.Position;

objCommand.Connection = objConnection;
objCommand.CommandText = "update tbuy set code=@code,name=@name," +
"model=@model,manufacturer=@manufacturer,sn=@s n," +
"country=@country,price=@price,count=@count," +
"date=@date,description=@description where code=@code";
objCommand.CommandType = CommandType.Text;

objCommand.Parameters.AddWithValue("@code", txtCode.Text);
objCommand.Parameters.AddWithValue("@name", txtName.Text);
objCommand.Parameters.AddWithValue("@model", txtModel.Text);
objCommand.Parameters.AddWithValue("@manufacturer" ,
txtManufacturer.Text);
objCommand.Parameters.AddWithValue("@sn",txtSN.Tex t);
objCommand.Parameters.AddWithValue("@country", txtCountry.Text);
objCommand.Parameters.AddWithValue("@price",txtPri ce.Text);
objCommand.Parameters.AddWithValue("@count",txtCou nt.Text);
objCommand.Parameters.AddWithValue("@date", txtDate.Text);
objCommand.Parameters.AddWithValue("@description",
txtDescription.Text);


objConnection.Open();
try
{
int i = objCommand.ExecuteNonQuery();
if (i == 1)
MessageBox.Show("اطلاعات شما با موفقیت ثبت شد");
}// end try
catch (SqlException sqlExceptionErr)
{
if (sqlExceptionErr.Number == 2627)
MessageBox.Show("اين کد قبلا ثبت شده");
else
MessageBox.Show(sqlExceptionErr.Message);
}// end catch
objConnection.Close();

FillDataSetAndView();
BindFields();

objCurrencyManager.Position = intposition;
ShowPosition();

toolStripStatusLabel1.Text = "Record Updated";

}// end btnUpdate_Click


بعد این تغییرات رو انجام دادم ولی هر چی وارد میکنم میره تو catch میگه این کد قبلا ثبت شده. لطفا بگید که چه کنم

objCommand.CommandText = "update tbuy set code='"+ txtCode.Text +"',name=@name," +
"model=@model,manufacturer=@manufacturer,sn=@s n," +
"country=@country,price=@price,count=@count," +
                 "date=@date,description=@description where code=code";