I want to add a new column to my dataset without affecting the underlying database. That new column will be updated from my WinForm. How to do changes (add column, do updates, etc) on a dataset without affecting the database?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
They don’t affect the underlying data source at all. The DataSet is an in-memory representation of the data that you queried from the underlying data source. Any changes to the data in the data set are not persisted back to the database until you pass it to a data adapter to update the data.
The data adapter cannot change the structure given changes to the structure of the dataset (more or less columns, types of columns, etc, etc), so you don’t have to be worried about changes to the structure, unless you are changing the names of columns or the types, in which case, the data adapter might have trouble mapping the data back to the data source.