Windows Develop Bookmark and Share   
 index > Windows Forms Data Controls and Databinding > DataTable without Dataset
 

DataTable without Dataset

is there a way to use DataTable and linked it to the database without using the dataset ??


i have a datatable that i populate using the load from a Datareadermethod


DataTable MyTable = new DataTable();

reader1 = SQlcommand1.executeReader();

MyTable.load(reader1);


i need to update the table and change the actual data in the database. please help

VSk2K1  Tuesday, September 29, 2009 4:18 AM
If you are using TableAdapters (and the data designers), it will generate code for you that can perform updates.

If not (and many of us don't), then you will need to write code to perform your updates.

I have an example here using a SQL statement to perform an update:

http://msmvps.com/blogs/deborahk/archive/2009/08/21/dal-save-data-using-a-sql-statement.aspx

I have an example here using a stored procedure to perform an update:

http://msmvps.com/blogs/deborahk/archive/2009/08/14/dal-save-data-using-a-stored-procedure.aspx

Hope this helps.
www.insteptech.com ; msmvps.com/blogs/deborahk
We are volunteers and ask only that if we are able to help you, that you mark our reply as your answer. THANKS!
DeborahK  Tuesday, September 29, 2009 3:32 PM
If you are using TableAdapters (and the data designers), it will generate code for you that can perform updates.

If not (and many of us don't), then you will need to write code to perform your updates.

I have an example here using a SQL statement to perform an update:

http://msmvps.com/blogs/deborahk/archive/2009/08/21/dal-save-data-using-a-sql-statement.aspx

I have an example here using a stored procedure to perform an update:

http://msmvps.com/blogs/deborahk/archive/2009/08/14/dal-save-data-using-a-stored-procedure.aspx

Hope this helps.
www.insteptech.com ; msmvps.com/blogs/deborahk
We are volunteers and ask only that if we are able to help you, that you mark our reply as your answer. THANKS!
DeborahK  Tuesday, September 29, 2009 3:32 PM

You can use google to search for other answers

Custom Search

More Threads

• how to solve AxOWC11 dll Error
• Parent/Child DataRelation - Relation Rule - Accept/Reject - Child Update Record failure
• Three teir design and databinding
• editing cells in a datagridview
• Data Validation for a bound VB form
• Need Help with Variables and Databinding
• DataGridView and UseWaitCursor
• Problems inheriting a form with DataGridView on it.
• Report Viewer Control Print Problem?
• highlighting a row by mouse right click