Stupid dataset question...

  • Thread starter Thread starter KC
  • Start date Start date
K

KC

From what little I understand about them, datasets are like mini-databases.
If this is so, can I query tables in that dataset? What kind of object would
I hold the result set in?


Ken
 
Ken,
You can use either a DataView or DataTable.Select to query tables in a
DataSet.

The DataView is an object in its own right, If you use a For Each on a
DataView it will return DataRowView objects, while DataTable.Select returns
an array of DataRow objects.

For details on this and other exciting questions on ADO.NET (Datasets) I
would recommend Sceppa's book, which is a good tutorial on ADO.NET as well
as a good desk reference once you know ADO.NET. David Sceppa's book is
"Microsoft ADO.NET - Core Reference" from MS press.

Hope this helps
Jay



Hope this helps
Jay
 
Come on Jay, tell me, Just how much is David paying you to plug his book ?

;-)

--

OHM ( Terry Burns )
. . . One-Handed-Man . . .
 
Terry,
Not nearly enough :-)

But Hey I plug Fowler's book an awful lot also!

I just find it the easiest read to learn ADO.NET!

Jay

One Handed Man ( OHM - Terry Burns ) said:
Come on Jay, tell me, Just how much is David paying you to plug his book ?

;-)
<<snip>>
 
The Framework and its nuances in total are both immense and complex (
though well thought out ) , when I first started with .NET I really had no
Idea how huge it really is, I had this opinion that I would be able to learn
it's main parts in a couple of weeks, and be really good within six months.

Considering the sheer scope of knowledge one needs JUST to get a reasonable
understanding of what's possible, let alone be proficient in most area's
it's really amazing that good .NET people are not mostly millionaires


--

OHM ( Terry Burns )
. . . One-Handed-Man . . .
 
Hi KC,

In addition to the others, a dataset is definitely not a mini database.

It can hold data from a database in memory where it reflects as well a lot
of the structure from the selected data from databases (it can be more than
one).

That dataset can as well be transported over the internet and as well saved
on disk in a XML format. However not be accessed in a database way, it is
only read or write of the whole dataset.

To process the data in a dataset are many methods, you can databind it, and
select the rows, filter rows, loop trough rows, add columns, and delete
columns, however only in memory.

Just a little addition.

Cor
 
Much Thanks!

Jay B. Harlow said:
Ken,
You can use either a DataView or DataTable.Select to query tables in a
DataSet.

The DataView is an object in its own right, If you use a For Each on a
DataView it will return DataRowView objects, while DataTable.Select returns
an array of DataRow objects.

For details on this and other exciting questions on ADO.NET (Datasets) I
would recommend Sceppa's book, which is a good tutorial on ADO.NET as well
as a good desk reference once you know ADO.NET. David Sceppa's book is
"Microsoft ADO.NET - Core Reference" from MS press.

Hope this helps
Jay



Hope this helps
Jay
 
Back
Top