Connect with Expertise | Find Experts, Get Answers, Share Insights

DataSet vs DataTable

csharpula csharp
 
Posts: n/a
#1: Sep 8 '07
Hello,
Could you please tell me the difference between DataSet and DataTable?
Thank u!



*** Sent via Developersdex http://www.developersdex.com ***

Smithers
 
Posts: n/a
#2: Sep 8 '07

re: DataSet vs DataTable


To simplify things, a DataSet contains multiple DataTables.

To compare things to a typical relational database, a DataTable would be
roughly equivalent to a table in a database - whereas a DataSet is in many
ways like a database. A DataSet can define DataRelations - which define the
relationship between DataTables, much like a foreign key relationship can be
set up between tables in a database. DataSets, themselves, contain no data.
DataSets contain DataTables (which is where any data actually resides),
DataRelations, etc, but no data.

If you only need one in-memory "table" - then you can create a DataTable and
use it without also having it reside within a DataSet.

-HTH



"csharpula csharp" <csharpula@yahoo.comwrote in message
news:uvy8Qpj8HHA.1208@TK2MSFTNGP05.phx.gbl...
Hello,
Could you please tell me the difference between DataSet and DataTable?
Thank u!
>
>
>
*** Sent via Developersdex http://www.developersdex.com ***

Closed Thread

Tags
diffrence dataset