363,925 Members | 2607 Browsing Online
Community for Developers & IT Professionals
Bytes IT Community

DataSet vs DataTable

csharpula csharp
P: n/a
csharpula csharp
Hello,
Could you please tell me the difference between DataSet and DataTable?
Thank u!



*** Sent via Developersdex http://www.developersdex.com ***
Sep 8 '07 #1
Share this Question
Share on Google+
1 Reply


Smithers
P: n/a
Smithers
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 ***

Sep 8 '07 #2

Post your reply

Help answer this question



Didn't find the answer to your C# / C Sharp question?

You can also browse similar questions: C# / C Sharp diffrence dataset