I am updating the sql server 2005 database using batch update, as shown below
cmd = new SqlCommand("update Table1 set column1 = @column1 where EmpNo = @EmpNo", con);
cmd.Parameters.Add(new SqlParameter("@column1", SqlDbType.VarChar));
cmd.Parameters["@column1"].SourceVersion = DataRowVersion.Current;
cmd.Parameters["@column1"].SourceColumn = "Column";
cmd.Parameters.Add(new SqlParameter("@EmpNo", SqlDbType.Int));
cmd.Parameters["@EmpNo"].SourceVersion = DataRowVersion.Current;
cmd.Parameters["@EmpNo"].SourceColumn = "EmpNo";
cmd.UpdatedRowSource = UpdateRowSource.None;
sqlDa = new SqlDataAdapter();
con.Open();
sqlDa.UpdateCommand =cmd;
sqlDa.UpdateBatchSize = 10;
sqlDa.Update(dt);
con.Close();
But the data is not updated.I am unable to figure out what is the problem.Any help is appreciated.