110,565
社区成员
发帖
与我相关
我的任务
分享
using (SqlConnection connection = new SqlConnection(connectionString))
{
SqlDataAdapter adapter = new SqlDataAdapter();
adapter.SelectCommand = new SqlCommand(queryString, connection);
SqlCommandBuilder builder = new SqlCommandBuilder(adapter);
connection.Open();
DataTable customers = new DataTable();
adapter.Fill(customers);
// code to modify data in DataTable here
adapter.Update(customers);
}