|
-
Mar 5th, 2015, 05:57 AM
#1
Thread Starter
Addicted Member
Search for a string in an mdb column
Hi, my app is using an mdb database and one of my form is holding a dataset, a databindingsource and a tableadapter. I want to search if the column "product_name" has a cell with some value (for example: LENOVO Z5070 İ5-4210U 8G 1TB+8G SSHD 15.6")
Is there a simple way to do this?
-
Mar 5th, 2015, 08:00 AM
#2
Hyperactive Member
Re: Search for a string in an mdb column
-
Mar 5th, 2015, 09:50 AM
#3
Thread Starter
Addicted Member
Re: Search for a string in an mdb column
Thanks for the reply. I searched for "DataSet.Filter" but couldn't find what I was looking for. Could you give me example code?
-
Mar 5th, 2015, 10:25 AM
#4
Re: Search for a string in an mdb column
On the DataTable, there is a DefaultView property, which contains a RowFilter property that you can set similar to a SQL WHERE clause.
http://stackoverflow.com/questions/5...ing-datasource
There is also this which takes a slightly longer route by skipping the devault view and creating a new one and assigning it to the DGV each time.
http://vb.net-informations.com/datag...dview_sort.htm
-tg
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|