By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,299 Members | 1,225 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,299 IT Pros & Developers. It's quick & easy.

query to find records with substring

P: 10
hi friends. i am using VS2005 to develop a windows application.
I have a datagrid bound to a dataset with only one database table in it.

I have added following query to data adapter :


SELECT MatNO, Descp, MatGrp, Type, Qlty, Unit
FROM material_master
WHERE (Descp LIKE '%' + @name1 + '%')


now when i run this query with query builder the result is ok.when i saved the quer with name " FillBy_Matname_name(@name1)"

and then use to see the preview of data in datagrid with this query name the results are not displayed.but if i enter the exact Descp only then record is displayed .but not on entering a substring.
whereas i have written the query for substring

what could be the problem,in query builder its showing records
Apr 26 '10 #1
Share this question for a faster answer!
Share on Google+

Post your reply

Sign in to post your reply or Sign up for a free account.