PC Review


Reply
Thread Tools Rate Thread

DataSet SubQuery

 
 
Alan
Guest
Posts: n/a
 
      15th Jul 2004
Dear all,

Can I use the Dataset to create two datasets, a one dataset result is based
on the other dataset, like the subqurey?

can you give me some example?

Thanks

Regards,

Alan


 
Reply With Quote
 
 
 
 
Ken Tucker [MVP]
Guest
Posts: n/a
 
      15th Jul 2004
Hi,

Take a look at the datatable.select method.
http://msdn.microsoft.com/library/de...electtopic.asp

Ken
-----------------------
"Alan" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> Dear all,
>
> Can I use the Dataset to create two datasets, a one dataset result is
> based
> on the other dataset, like the subqurey?
>
> can you give me some example?
>
> Thanks
>
> Regards,
>
> Alan
>
>



 
Reply With Quote
 
Cor Ligthert
Guest
Posts: n/a
 
      16th Jul 2004
Hi Alan,

Yesterday I did send this sample, I think you can use that (I changed it a
little bit in this message to let it fit more to your needs so watch typos).

I hope this helps?

Cor
\\\
Dim dv As New DataView(dt.tables(0))
dv.Sort = "bla"
dv.rowfilter = "MyField = 1"
Dim dtnew As DataTable = dt.tables(0).Clone
For Each dvr As DataRowView In dv
dtnew.ImportRow(dvr.Row)
Next
dt.tables.add(dtnew)
///


 
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
Unable to cast object of type 'System.Data.DataSet' to Typed DataSet Optimus Microsoft VB .NET 1 31st Jan 2006 06:26 AM
Update Query with subquery with where clause to subquery?! bu Microsoft Access 2 1st Apr 2005 03:34 PM
Ccopying a datatable content from an untyped dataset into a table which is inside a typed dataset Nedu N Microsoft ADO .NET 7 9th Dec 2003 02:50 PM
copying a datatable content from an untyped dataset into a table which is inside a typed dataset Nedu N Microsoft Dot NET Framework 3 31st Oct 2003 01:05 PM
Ccopying a datatable content from an untyped dataset into a table which is inside a typed dataset Nedu N Microsoft Dot NET Framework 2 31st Oct 2003 02:39 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 08:03 AM.