如何在Windows表单中查询数据库?
我正在VS2015中创建一个小C#应用。我需要用户在文本框中输入值,然后从数据库中检索结果。我已经定义了数据集并建立了适当的关系。数据集中有9个表。 (这产生了整个代码。) 查询将使用所有9个表(我已经检查了语法,查询正确),并使用23列返回1行。我在表单上放置了一个文本框和按钮,其想法是按钮键将根据文本框中输入的内容执行查询。我也想以列表类型的方式显示结果。我不知道下一步该怎么做。 蒂亚, 特雷西
I'm creating a small C# app in VS2015. I need a way for the user to enter a value in a text box, then retrieve the results from the database. I've already defined the dataset and made the appropriate relations. There are 9 tables in the dataset. (This generated a whole boat load of code.)
The query will use all 9 tables (I've check the syntax, the query is correct) and return 1 row with 23 columns. I put a text box and button on the form, the idea is that the buttonClick will execute the query based on what was entered in the text box. I'd also like to display the results in a list-type fashion. I don't have any idea what to do next.
TIA,
Tracy
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论