C
caldera
I am using SqlCommandBuilder to update,insert,delete my data. I can do for insert and
delete. My code is
string sql=" select * from "+dbname;
SqlDataAdapter sdata=new SqlDataAdapter();
sdata.SelectCommand=new SqlCommand(sql,scon);
SqlCommandBuilder scom=new SqlCommandBuilder(sdata);
sdata.UpdateCommand=scom.GetUpdateCommand();
sdata.RowUpdating+=new SqlRowUpdatingEventHandler(sdata_RowUpdating);
sdata.RowUpdated+=new SqlRowUpdatedEventHandler(sdata_RowUpdated);
sdata.Update(ds,dbname);
but when I reach the SqlRowUpdating Event my event argument command is undefined. But my
dataadapter take the update command correctly.
How can I solve this problem
Thanks for all.
delete. My code is
string sql=" select * from "+dbname;
SqlDataAdapter sdata=new SqlDataAdapter();
sdata.SelectCommand=new SqlCommand(sql,scon);
SqlCommandBuilder scom=new SqlCommandBuilder(sdata);
sdata.UpdateCommand=scom.GetUpdateCommand();
sdata.RowUpdating+=new SqlRowUpdatingEventHandler(sdata_RowUpdating);
sdata.RowUpdated+=new SqlRowUpdatedEventHandler(sdata_RowUpdated);
sdata.Update(ds,dbname);
but when I reach the SqlRowUpdating Event my event argument command is undefined. But my
dataadapter take the update command correctly.
How can I solve this problem
Thanks for all.