To register for an Internet.com membership to receive newsletters and white papers, use the Register button ABOVE.
To participate in the message forums BELOW, click here
VBForums  

VB Wire News
Part 10 of the Visual Basic .NET 2010 Express Tutorial Complete!
How to Use the Visual Studio Code Analysis Tool FxCop
Article :: Interview with Andrei Alexandrescu (Part 3 of 3)
Introducing Visual Studio LightSwitch
Visual Studio LightSwitch Beta 1 is Available



Go Back   VBForums > Visual Basic > Database Development

Reply Post New Thread
 
Thread Tools Display Modes
Old May 28th, 2007, 10:54 AM   #1
pszyk
New Member
 
Join Date: May 07
Location: Oakland, Ca
Posts: 3
pszyk is an unknown quantity at this point (<10)
Q. How do I save (dataadapter, datatable) data?

vb2005ATABASE .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.
pszyk is offline   Reply With Quote
Reply

Go Back   VBForums > Visual Basic > Database Development


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -5. The time now is 05:26 AM.





Acceptable Use Policy

Internet.com
The Network for Technology Professionals

Search:

About Internet.com

Legal Notices, Licensing, Permissions, Privacy Policy.
Advertise | Newsletters | E-mail Offers

Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.