可以阿
SqlCommandBuilder sc = new SqlCommandBuilder(sda); sda.InsertCommand = sc.GetInsertCommand(); sda.UpdateCommand = sc.GetUpdateCommand(); sda.DeleteCommand = sc.GetDeleteCommand(); sda.Update(ds,"login"); this.ds.AcceptChanges(); this.dataGrid1.DataSource = ds.Tables["login"];
楼上的,我看你的怎么有点晕呀!你这是要干什么呀?比较笨不明白!