Q. How do I save (dataadapter, datatable) data?
:wave: vb2005:DATABASE .NET 2
Newbie Question: I want to add a column to dataadapter data, display the dataadapter as the source to a datagrid and save the (updated) results to a connected database.
The setup:
a) Create DataSet:
Add two tables: Table A and Table B
b) Create Dataadapter: (with Query Builder)
Add Table A and Table B
Select data columns to display
Add a *new* column (not in either table)
c) Create Form
Add a datagridview and set source = dataadapter
d) Run the application <F5>:
a. Datagridview shows results of dataadapter including the added column (which is empty)
b. User adds data to new column
Now that I have the data in the datagridview I have two questions:
Q1. How do I save the datagrid contents to a local table and to my connected database (e.g., MsAccess)? If I save the results to a local table will the data be saved for the next session?
Q2. How do I add to a DataTable in the DataSet and then save the contents to a connected database?
I don't have a problem *getting* data and load it into controls (Fill) but I need help to learn how to save the data!
Sorry for the vagueness and possible because I am a total vb 2005 newbie who is very confused with the multitude of data controls: DataSet, DataAdapter, DataTable, TableAdapter, and how they all connect together. I have read through the threads to find the answers to my questions but did not find a solution.
Many thanks for any help or suggestions anyone may have.