i have a datagridview
and a textbox
what i need is if the user search a data in textbox
for example she types "a" all the data that "contains" a in letter it should display in datagridview
i tried query
LIKE @Description '%'
but it typed only the word the contains "a" at the beginning of the sentence what i need is : for example if i type "ginn" should display in datagridview
"be* ginn *ing"
Before adding value of textbox
to SqlParameter do next:
Dim sqlValue As String = String.Format("%{0}%", textbox.Text)
Create SqlParameter
with new string and then use it in SQL query
LIKE @Description
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.