使用文本框过滤数据并在 vb.net 的列表视图中查看
我想在列表视图中显示我在文本框中编写的结果,你能帮我吗?
I want to display the result in listview that i written in the texbox can you pls help me?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
如果您要求能够根据与您在文本框中键入的内容类似的条件进行搜索(我认为这就是您所要求的),那么请将您的 SQL 语句更改为
= 。问题是,只有在 = 完全匹配的情况下,您才会得到结果。 LIKE 语句将查找与输入内容相似的内容。 % 是通配符,意思是“任意数量的字符”。请注意,它适用于大多数数据库。如果它不适合您,请查找您的数据库的通配符并替换 %s。
If you are asking for the ability to search based on criteria similar to what you type in the textbox (I think that is what you are asking), then change you SQL statement to be
instead of =. The problem is that you will only get results back on the = if it matches exactly. The LIKE statement will find things similar to what is entered. THe % is a wildcard character meaning "any number of characters". Note that it will work for MOST dbs. If it does not work for you, look up wildcard characters for your db and replace the %s.