问题描述
您好,我目前正在制作一个数据项目,我想为我的项目寻找一种搜索方法.
该表单具有三个分别名为textbox1,textbox2和textsearch的文本框.数据库具有一个名为tblwords的表和两个分别名为"word"和"mean"的字段.我想当我单击搜索按钮时,它应该显示一个输入框并从中获取搜索值("word"字段是搜索字段),它应该在textbox2中显示结果.我使用oledbconnection添加数据库.
Hi I''m currently making a data project and I want a search method for my project.
The form have three text boxes named textbox1 ,textbox2 and textsearch .The database have a table named tblwords and two fields named ''word'' and ''mean''.
I want when I click on a search button it should display a input box and get the search value from it(the ''word'' field is the searching field)it should display results in textbox2. I used oledbconnection to add database.
推荐答案
SELECT mean FROM tblwords WHERE word='TheWordToLookup'
3)执行命令.
4)将结果放入文本框.
哪一部分给您带来困难?
3) Execute the command.
4) Put the results into your text box.
What part of this is giving you difficulties?
这篇关于搜索访问数据库的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!