Update data table on ASMX Service side

Posted by Paul on Stack Overflow See other posts from Stack Overflow or by Paul
Published on 2010-03-24T08:48:59Z Indexed on 2010/03/24 8:53 UTC
Read the original article Hit count: 260

Filed under:
|

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.

© Stack Overflow or respective owner

Related posts about c#

Related posts about dataset