SqlConnectionconn=newSqlConnection("SERVER=.;UID=sa;PWD=sa;DATABASE=pubs");SqlDataAdapteradapter=newSqlDataAdapter("SELECT*FROMsales",conn);SqlCommandBuildercmdbuilder=newSqlCommandBuilder(adapter);DataSetds=newDataSet;adapter.Fill(ds);adapter.UpdateCommand=cmdbuilder.GetUpdateCommand;adapter.Update(ds,ds.Table[0].TableName);