using System;
using System.Collections.Generic;
using System.Text;
using System.Data.SqlClient;
using System.Data;

namespace BatchUpdate
{
    class Program
    {
        static void Main(string[] args)
        {
            DataSet ds = new DataSet();
            SqlDataAdapter da = new SqlDataAdapter(
                "select au_id, au_fname, au_lname from authors",
                "server=.;database=pubs;integrated security=sspi");
            da.Fill(ds);
            Console.WriteLine(ds.Tables[0].Rows[0][0]);
            ds.Tables[0].Rows[0][1] = "Bob";
            SqlCommandBuilder bld = new SqlCommandBuilder(da);
            da.UpdateBatchSize = 2;
            da.Update(ds);

        }
    }
}
