Creating a Dataview from a Dataset using SQL?

  • Thread starter Thread starter Simon Verona
  • Start date Start date
S

Simon Verona

I'm probably missing the obvious.

I have a dataset that is built in code (it has a single datatable) that I
want to populate a datagrid based on an SQL statement that I want to run
against the dataset.

I can't work out though how to create a dataview from the dataset using an
SQL statement.

Have I missed something stupid?

Thanks
Simon
 
QueryaDataSet looks exactly what I need. Didn't think I'd missed anything!

Thanks
Simon
Miha Markic said:
Hi Simon,

Each DataTable has a DefaultView property (you can create as much
DataView's as you want) that lets you filter and sort rows. If this isn't
enough for you then you might take a look at
http://www.queryadataset.com/

--
Miha Markic [MVP C#, INETA Country Leader for Slovenia]
RightHand .NET consulting & development www.rthand.com
Blog: http://cs.rthand.com/blogs/blog_with_righthand/

Simon Verona said:
I'm probably missing the obvious.

I have a dataset that is built in code (it has a single datatable) that I
want to populate a datagrid based on an SQL statement that I want to run
against the dataset.

I can't work out though how to create a dataview from the dataset using
an SQL statement.

Have I missed something stupid?

Thanks
Simon
 
Simon,

You know as that you don't use a datatable that does not need to be
serialized and/or don't used in a strongly typed datatset, then you can use
the datatable direct in your actions.

Cor
 
Back
Top