What you want to see on DotNetFunda.com ?
DotNetFunda.Com Logo
Twitter TwitterLinkedIn
YouTubeGoogle
 Online : 34945 |  Welcome, Guest!   Register  Login
 Home > Forums > VB.NET > Error in LIKE Operator in Dataview Row Filter ...
Sankar20092010

Error in LIKE Operator in Dataview Row Filter

Replies: 6 | Posted by: Sankar20092010 on 9/29/2012 | Category: VB.NET Forums | Views: 1679 | Status: [Member] | Points: 10  


Hi.....

I have a search pop up form in VB.NET. Suppose it has a text box for searching and a datagridview. The field name to be searched is employee name.
I want the output needed as described below.

On typing employee name as 'a*' i want all employees starting with a or contains a.
On typing employee name as 'a*a' and error is coming . i want to know how to escape wild characters like '*', '[', '%' , ''"

suppose i want to search 'sunil's*' how it is possible.

Thanks and Regards

Sankar


Reply | Reply with attachment | Alert Moderator

 Responses below this adGet hundreds of .NET Tips and Tricks videos

 Replies

Jayakumars
Jayakumars  
Posted on: 9/29/2012 1:06:23 AM
Level: Bronze | Status: [Member] | Points: 25

Sankar20092010, if this helps please login to Mark As Answer. | Reply | Alert Moderator 

Jayakumars
Jayakumars  
Posted on: 9/29/2012 1:06:32 AM
Level: Bronze | Status: [Member] | Points: 25

hi
Please mark as answer if it helpful to you.


Mark as Answer if its helpful to you

Regards
Email Id: kumaraspcode2009@gmail.com

Sankar20092010, if this helps please login to Mark As Answer. | Reply | Alert Moderator 

Sankar20092010
Sankar20092010  
Posted on: 9/29/2012 1:16:53 AM
Level: Starter | Status: [Member] | Points: 25

hi jayakumars,

i already tried these 3 websites but it is not possible. i am calling that function in text changed event it goes like recursion also.
Can any one post a simple example to illustrate this.
Regards
Sankar
sankar20092010@gmail.com

Sankar20092010, if this helps please login to Mark As Answer. | Reply | Alert Moderator 

Jayakumars
Jayakumars  
Posted on: 9/29/2012 1:31:11 AM
Level: Bronze | Status: [Member] | Points: 25

hi
you need gridview search purpose row filter like query ?
or post your code here.

Mark as Answer if its helpful to you

Regards
Email Id: kumaraspcode2009@gmail.com

Sankar20092010, if this helps please login to Mark As Answer. | Reply | Alert Moderator 

Jayakumars
Jayakumars  
Posted on: 9/29/2012 1:46:27 AM
Level: Bronze | Status: [Member] | Points: 25

hi
sankar
refer this url working good.

http://www.dotnetfunda.com/codes/code3292-how-to-use-dataview-and-bind-the-gridview-with-like-query.aspx


Dont Forgot Please mark as answer if it helpful to you.



Mark as Answer if its helpful to you

Regards
Email Id: kumaraspcode2009@gmail.com

Sankar20092010, if this helps please login to Mark As Answer. | Reply | Alert Moderator 

Sankar20092010
Sankar20092010  
Posted on: 9/30/2012 11:49:42 PM
Level: Starter | Status: [Member] | Points: 25

hi jayakumars,

Ya this url is fine. but inside that i found the line

dv.RowFilter = "ProductName like '%Mouse%'"; its work fine for me and we are doing an windows applicattion also. But my problem is
when typing '*mouse" or "*mouse*" its should be give the same result. But here a validation should be added that "*mous*e'" should not be there since
it will give an error in Like operator. Hope u understood , please reply as soon as possible,

Thanks very much
Sankar
sankar20092010@gmail.com

Sankar20092010, if this helps please login to Mark As Answer. | Reply | Alert Moderator 

Reply - Please login to reply


Click here to login & reply

Found interesting? Add this to:


 Latest Posts

Write New Post | More ...

About Us | Contact Us | The Team | Advertise | Software Development | Write for us | Testimonials | Privacy Policy | Terms of Use | Link Exchange | Members | Go Top
General Notice: If you find plagiarised (copied) contents on this page, please let us know the original source along with your correct email id (to communicate) for further action.
Copyright © DotNetFunda.Com. All Rights Reserved. Copying or mimicking the site design and layout is prohibited. Logos, company names used here if any are only for reference purposes and they may be respective owner's right or trademarks. | 5/24/2013 12:51:25 PM