0

Input from text box as text(not number) and by button click need all values from the sql table to be viewed in the datagridview.
eg:deptname as input in textbox, and by button click take all values from table matching this deptname and get output in datagridview.
Can anyone help me out in this matching of textbox value as text of mine.As its matching integer type but text type is not getting matched.

2
Contributors
5
Replies
6
Views
9 Years
Discussion Span
Last Post by Jx_Man
2
SELECT * FROM TableName WHERE ColumnName like '%" & textBox1.Text & "%'
Votes + Comments
got it
0

Hello i've tried this,but still i'm not getting the output...:-(...
Can u suggest some other solutions??

0

Thankuu its working now...i was leaving space between ' &"..
thankuu..i was trying to solve this from past many days..but couldn't solve...now i could with ur help...:-)

0

you're welcome sainiricha.
don't forget to mark this thread solved.
happy coding friend :)

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.