Table Adapter Vs Data Adapter

Posted by Akiii under C# on 3/10/2011 | Points: 10 | Views : 12020 | Status : [Member] | Replies : 4
Can anybody describe what is the difference between Table Adapter Vs Data Adapter ?
i have read it in msdn but didnt quite understand it ...!

Thanks and Regards
Akiii




Responses

Posted by: Prabhakar on: 3/10/2011 [Member] [MVP] Starter | Points: 25

Up
0
Down
HI akiii..

check this link . .it's use full for you


http://www.vbforums.com/showthread.php?t=372209

Best Regard's
Prabhakar

Akiii, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Akiii on: 3/14/2011 [Member] Bronze | Points: 25

Up
0
Down
@Prabhakar
thank you very much for the link....
i have read it but it was not quite clear to me. On what occasion shd one use Table Adapter and Data Adapter ?
help is needed .....

Thanks and Regards
Akiii

Akiii, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Mesh_2010 on: 3/14/2011 [Member] Starter | Points: 25

Up
0
Down

Hi,
TableAdapter vs DataAdapter

TableAdapters provide communication between your application and a database. More specifically, a TableAdapter connects to a database, executes queries or stored procedures, and either returns a new data table populated with the returned data or fills an existing DataTable with the returned data. TableAdapters are also used to send updated data from your application back to the database.

Users of previous versions of Visual Studio can think of a TableAdapter as a DataAdapter with a built-in connection object and the ability to contain multiple queries. Each query added to a TableAdapter is exposed as a public method that is simply called like any other method or function on an object.

In addition to the standard functionality of a DataAdapter, TableAdapters provide additional typed methods that encapsulate queries that share a common schema with the associated typed DataTable. In other words, you can have as many queries as you want on a TableAdapter as long as they return data that conforms to the same schema.

In the previous version of Visual Studio, ADO.NET Data Adapters were used for communicating between an application and a database. While data adapters are still a main component of .NET Framework Data Providers, TableAdapters are designer-generated components that improve upon the functionality of DataAdapters. TableAdapters typically contain Fill and Update methods to fetch and update data in a database.

TableAdapters are created with the Dataset Designer inside of strongly typed datasets. You can create TableAdapters during creation of a new dataset with the Data Source Configuration Wizard. You can also create TableAdapters in existing datasets with the TableAdapter Configuration Wizard or by dragging database objects from Server Explorer onto the Dataset Designer. For more information, see How to: Create TableAdapters.

While TableAdapters are designed with the Dataset Designer, the TableAdapter classes generated are not generated as nested classes of the DataSet. They are located in a separate namespace specific to each dataset. For example, if you have a dataset named NorthwindDataSet, the TableAdapters associated with the DataTables in the NorthwindDataSet would be in the NorthwindDataSetTableAdapters namespace. To access a particular TableAdapter programmatically, you must declare a new instance of the TableAdapter.


Thanks
RameSH sinGH

Akiii, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Karthikanbarasan on: 3/15/2011 [Member] [Moderator] [Microsoft_MVP] [MVP] Silver | Points: 25

Up
0
Down
Check this link

http://social.msdn.microsoft.com/forums/en-US/adodotnetdataproviders/thread/11cecfbc-65b8-41bd-8e1a-566558a30368

Thanks
Karthik
www.f5Debug.net

Akiii, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response