使用文本框搜索记录,并使用VB.net访问将文档显示到文本框中 [英] Searching for Records by text boxes and displaying records into textboxes using acess with VB.net

查看:115
本文介绍了使用文本框搜索记录,并使用VB.net访问将文档显示到文本框中的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

HI。我正在使用MS Access和vb.net。但我发现很难创建一个搜索文本框,这将允许我通过在搜索框中输入值并将搜索结果显示在visual basic表单上的文本框中,从Ms访问数据库中检索特定记录。同时我已将我的Ms Access数据库附加到我的vb项目请帮助...谢谢。

HI. I am working with MS Access and vb.net . but i am finding it difficult to create a search textbox which will allow me to retrieve a specific record from Ms access database by inputting a value into a search box and the search results displayed into text boxes on the visual basic form. Meanwhile i have already attached my Ms Access database to my vb project Please help... thanks.

推荐答案

Don * NOT * 使用文本框显示你的结果。



这里有一些阅读材料,之后你可以在几分钟内完成这项工作。



参数化查询 [ ^ ] - 很棒的帖子



用它来获取数据表并阅读这个

DataGridView [ ^ ]



然后看看这个在后台运行你的查询以不停止你的线程

BackgroundWorker [ ^ ]



然后绑定到文本框OnChange(或KeyUp,具体取决于您的要求)以运行查询后台并填充DataGridView。
Don *NOT* use a text box to display your results.

Here is some reading for you, after which you should be able to bang this out in minutes.

Parameterized Queries[^] - Great Post

Use that to get a data table and read this
DataGridView[^]

Then look at this to run your queries in the background to not stop your thread
BackgroundWorker[^]

Then tie into your textbox OnChange (or KeyUp depending on your requirements) to run the query in the background and populate the DataGridView.


这篇关于使用文本框搜索记录,并使用VB.net访问将文档显示到文本框中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆