how to "sql query" cached datatable?

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
 
W

William F. Robertson, Jr.

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
 
J

jensen bredal

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

I found the answer through an other thread.

Thanks
JB
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,430
Messages
2,571,676
Members
48,796
Latest member
Greg L.

Latest Threads

Top