Assume I have a large dataset and I want to run a "like" function in the dataset eg column - Name
Is there any way to run a like statement in a dataset.
Is it possible with ASP.NET?
I dont want to run a query to the database.
Thanks
Assume I have a large dataset and I want to run a "like" function in the dataset eg column - Name
Is there any way to run a like statement in a dataset.
Is it possible with ASP.NET?
I dont want to run a query to the database.
Thanks
You, my friend, are in need of some LINQ. It is a generic query language which can, through the use of various providers, query SQL based data stores as well as in memory objects like lists. http://msdn.microsoft.com/en-us/netframework/aa904594.aspx
dataTable.Select("Name like '%rob%'");
The LIKE statement is supported in the DataTable.Select function as documented here:
http://msdn.microsoft.com/en-us/library/system.data.datacolumn.expression.aspx