PC Review


Reply
Thread Tools Rate Thread

Creating a Dataview from a Dataset using SQL?

 
 
Simon Verona
Guest
Posts: n/a
 
      3rd Oct 2007
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


 
Reply With Quote
 
 
 
 
Miha Markic
Guest
Posts: n/a
 
      3rd Oct 2007
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" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> 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
>


 
Reply With Quote
 
Simon Verona
Guest
Posts: n/a
 
      3rd Oct 2007
QueryaDataSet looks exactly what I need. Didn't think I'd missed anything!

Thanks
Simon
"Miha Markic" <miha at rthand com> wrote in message
news:%(E-Mail Removed)...
> 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" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
>> 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
>>

>



 
Reply With Quote
 
Cor Ligthert[MVP]
Guest
Posts: n/a
 
      4th Oct 2007
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

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Re: Problems creating custom dataview/dataset iDesmet Microsoft VB .NET 0 23rd Jun 2008 06:43 AM
Strongly typed dataset, sorted by dataview, how to get dataset's row index from dataview? Thomas H Microsoft ADO .NET 2 9th Mar 2006 03:04 PM
SQL Table to DataSet to Dataview, to DataSet to XML! matteo Microsoft ADO .NET 4 30th Jan 2006 04:18 PM
DataView vs. DataSet Hemang Shah Microsoft ADO .NET 8 30th Jan 2005 03:43 PM
using DataSet and DataView cmrchs@yahoo.com Microsoft ADO .NET 3 17th May 2004 06:20 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 08:38 PM.