这个表原来被绑定过,当我更换绑定的数据源的时候就这样了,当我把SQL语句中的as取消的时候,就好了
1 DataSet ds = new DataSet(); 2 SqlDataAdapter sqlda = new SqlDataAdapter("select workername,compensation.workerid ,compensationtime,addworkcompensation ,losecompensation ,othercompensation from compensation join worker on compensation.Workerid = Worker.Workerid where compensation.workerid=22", da.link()); 3 sqlda.Fill(ds, "table1"); 4 compensationBindingSource.DataSource = ds.Tables["table1"];<img></img>
转载于:https://www.cnblogs.com/dingyikai/archive/2012/12/10/2811774.html