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

% WildCard

P: 374
Hi guys.

id like a gridview to display the results from the textbox search, but i want it to search the db for anything i type in and match it.

sort of like

Expand|Select|Wrap|Line Numbers
  1. select * from [tablename] where [columnName] LIKE '%%'
but i want the value to be taken from the textbox.

Expand|Select|Wrap|Line Numbers
  1. select * from [tablename] where [columnName] LIK '% + search.text + %'
Apr 23 '08 #1
Share this Question
Share on Google+
2 Replies

P: 374
hi guys nvm i got the solution

Expand|Select|Wrap|Line Numbers
  1. Select * from [tableName] where [ColumnName] LIKE ('%' + @search + '%')
Thanks anyways
Apr 23 '08 #2

Expert 2.5K+
P: 2,878
Build your query from your apps.

-- CK
Apr 23 '08 #3

Post your reply

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