does the DataTable know your table has a primary key? make sure in your "select ...", the primary key column is selected, and before you fill the dataset, add something likeDataAdapter1.MissingSchemaAction = MissingSchemaAction.AddWithKey;
调试欢乐多
i'm sure that the problem deals with
DataAdapter1.MissingSchemaAction = MissingSchemaAction.AddWithKey;
but by the way,what's the function of this code,thanks saucer anyway:)