Update data table on ASMX Service side
- by Paul
Hi, I need advice. On Web Service side a I hav this method :
public DataSet GetDs(string id)
{
SqlConnection conn = null;
SqlDataAdapter da = null;
DataSet ds;
try
{
string sql = "SELECT * FROM Tab1";
string connStr = WebConfigurationManager.ConnectionStrings["Employees"].ConnectionString;
conn = new SqlConnection(connStr);
conn.Open();
da = new SqlDataAdapter(sql, conn);
ds = new DataSet();
da.Fill(ds, "Tab1");
return ds;
}
catch (Exception ex)
{
throw ex;
}
finally
{
if (conn != null)
conn.Close();
if (da != null)
da.Dispose();
}
}
It return dataset to client app. I client application is dataset binding in datagridview. Client can insert,update,delete row from table.
If client finish his work, I want accept change in data table on web service side.
I can sent clients all dataset na update table on web service side, but I want sent only changed data.
Any advice? Thank u.