Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Using complex filter expressions while filtering data tables

Status
Not open for further replies.
Oct 15, 2002
10
DE

Hello JohnEfford and everybody,

I ask myself, whether it's also possible to use complex filter expressions in dataTable.dataView.RowFilter and dataTable.Select. For example, how could I apply expressions such as the two expressions below?

select TerritoryDescription, r.RegionId, RegionDescription
from territories t, region r
where t.RegionID=r.RegionId and r.RegionId=1


select * from dataTable1
where id not in (select id from dataTable2)


Any comments are welcomed.

Best regards,

Gareth

 
Mistake in last post

Code:
da.SelectCommand = new SqlCommand(SqlText,);
should have been
Code:
da.SelectCommand = new SqlCommand(SqlText,cn);

 

Hello JohnEfford,

I think you sent your mail to the wrong thread, because there was no statement like
da.SelectCommand = new SqlCommand(SqlText,);
in your last post you sent to this thread.

Gareth
 
My original post which the last post corrected a line of seems to of disappeared into the ether.

You cannot join tables in memory or do correlated sub queries using data tables. If you needed to do this, for you in memory datatables, you would have write code to do it, the CLR does not provide methods to do it for you.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top