从ASP.Net调用Sql视图(C#) [英] Calling Sql View from ASP.Net (C#)
本文介绍了从ASP.Net调用Sql视图(C#)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我在sql server数据库中创建了view1。
我试图从我的asp.net代码(C#)调用view1。我怎么能这样做。
(我不想从前端传递查询)
-Himanshu S. Banoula
解决方案
解决方案
- 调用
存储过程
来自代码。- 在
存储过程
内,只需编写 Sql Query 即可从视图中进行选择。
I have created view1 in sql server database.
I am trying to call view1 from my asp.net code (C#). How can i do this.
(I dont want to pass query from front end)
-Himanshu S. Banoula
解决方案
Solution
- Call a
Stored Procedure
from the code.- Inside the
Stored Procedure
, just write the Sql Query to select from the view.
这篇关于从ASP.Net调用Sql视图(C#)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文