Visual Web Developer 通过按钮进行 SQL 查询

发布于 2024-09-15 20:20:36 字数 164 浏览 0 评论 0原文

我正在使用 Visual Web Developer 2010 创建一个网站。我当前有一个数据源,该数据源从已添加到 APP_Data 部分的 Access 数据库获取其信息。 1)如何使用网站上放置的按钮运行查询。

2)如何将该查询的结果显示到 datagridview 或其他一些数据控件中?

I am creating a web site using Visual Web Developer 2010. I currently have a datasource that gets its information from the Access database that has been added into the APP_Data section. 1) How would I run a query by using a button that been placed on the website.

2) How would I display the result of that query into a datagridview or some other data control?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

杀お生予夺 2024-09-22 20:20:36

您可以将 gridview 添加到表单,然后配置访问数据源以使用 where 子句来选择行。然后只需选择要从中获取值的文本框控件并添加一个按钮来执行回发,这将运行查询。

如果您需要更多帮助,请告诉我,我有一个工作示例。

替代文本

You can add a gridview to the form and then configure the access data source to use a where clause to select rows. Then just choose the textbox control you want to get the value from and add a button to do a post-back, which will run the query.

If you need more help with this let me know, I've got a working sample.

alt text

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文