H
hennovanrensburg
Does anyone know why the following procedure would not invoke the
delete command on the dataadapter?
public int updateDataSet(string sSelectSQL, DataSet oDs)
{
SqlConnection oConn = new SqlConnection(sConnStr);
SqlDataAdapter oAdp = new SqlDataAdapter(sSelectSQL,oConn);
SqlCommandBuilder oBuilder = new SqlCommandBuilder(oAdp);
try
{
oAdp.DeleteCommand=oBuilder.GetDeleteCommand();
oAdp.UpdateCommand=oBuilder.GetUpdateCommand();
return oAdp.Update(oDs.Tables[0]);
}
catch(Exception ex)
{
throw ex;
}
finally
{
oBuilder=null;
oAdp=null;
oConn=null;
}
}
I'm passing a dataset that has been modified, since the last time I
requested it. This procedure is web service/method call.
Please help?!
delete command on the dataadapter?
public int updateDataSet(string sSelectSQL, DataSet oDs)
{
SqlConnection oConn = new SqlConnection(sConnStr);
SqlDataAdapter oAdp = new SqlDataAdapter(sSelectSQL,oConn);
SqlCommandBuilder oBuilder = new SqlCommandBuilder(oAdp);
try
{
oAdp.DeleteCommand=oBuilder.GetDeleteCommand();
oAdp.UpdateCommand=oBuilder.GetUpdateCommand();
return oAdp.Update(oDs.Tables[0]);
}
catch(Exception ex)
{
throw ex;
}
finally
{
oBuilder=null;
oAdp=null;
oConn=null;
}
}
I'm passing a dataset that has been modified, since the last time I
requested it. This procedure is web service/method call.
Please help?!