I am using the following code and SQL Profiler shows no activity when I step
through the .update line. Do you see a syntax error?
Thanks!
using (SqlConnection cn = new SqlConnection(c nStr))
{
SqlCommand updCmd = new SqlCommand
("sp_web_edit_m anager_update", cn);
SqlDataAdapter adpt = new SqlDataAdapter( updCmd);
updCmd.UpdatedR owSource = UpdateRowSource .None;
updCmd.Paramete rs.Add("@entity ", SqlDbType.VarCh ar,10,
dtOnlyChanges.C olumns[0].ColumnName);
updCmd.Paramete rs.Add("@edit_i d", SqlDbType.Int, 4,
dtOnlyChanges.C olumns[1].ColumnName);
updCmd.Paramete rs.Add("@edit_o verride", SqlDbType.VarCh ar, 1,
dtOnlyChanges.C olumns[2].ToString());
updCmd.Paramete rs.Add("@biller _cd", SqlDbType.VarCh ar, 20,
dtOnlyChanges.C olumns[3].ToString());
updCmd.Paramete rs.Add("@includ e_in_stats", SqlDbType.VarCh ar,
1, dtOnlyChanges.C olumns[4].ToString());
adpt.UpdateComm and = updCmd;
// Set the Batch Size. 0 means all; default is 1.
adpt.UpdateBatc hSize = 10;
// Send the new rows and the changed rows to the database
adpt.Update(dtO nlyChanges);
}
--
Message posted via http://www.dotnetmonster.com