how to "sql query" cached datatable?

  • Thread starter Thread starter jensen bredal
  • Start date Start date
J

jensen bredal

Hello,
I have cahced a datatable object in my application cache.
I know i can use RowFiltwer from the derived dataview.
But what i need is a full blown select statement.

How can this be done on either datatable or dataview?


Many thanks in advance
JB
 
What do you mean a full blown select statement? You can select Rows from a
DataTable.

DataTable table = Application["DataTable"] as DataTable;

DataRow [] rows = table.Select( "ApplicationID > 7 and Name <> 'Ignore me'
" );

You will now have a DataRow array with all the rows where the column
ApplicationID is > 7 and name does not equal 'Ignore me'.

bill
 
what if i wanted Top(50) with the same filter condition?

I found the answer through an other thread.

Thanks
JB
 
Back
Top