通过按钮的Visual Web Developer SQL查询 [英] Visual Web Developer SQL Query via Button

查看:93
本文介绍了通过按钮的Visual Web Developer SQL查询的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

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

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)如何将查询结果显示到datagridview或其他数据控件中?

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

推荐答案

您可以将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.

这篇关于通过按钮的Visual Web Developer SQL查询的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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