何时使用web方法从datbase中获取数据 [英] when to use webmethods to fetch datafrom datbase

查看:121
本文介绍了何时使用web方法从datbase中获取数据的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述


这是一个普遍的讨论问题,何时应该使用Web方法从数据库中获取数据以及是否存在任何性能问题,哪一个是速度更快的ADO.net或Webmethod,可通过Java脚本或Jqyery使用Ado.net进行.

Hi,
its a general discussion question, when we should use web methods to fetch data from database and whether there is any performance issue , which one is faster ADO.net or Webmethod Using Ado.net through java script or Jqyery.

推荐答案

1.如果在多台PC上安装了桌面应用程序,并且该应用程序当时与单个数据库交互,则必须使用Web服务概念.

2. Web应用程序=>您必须在Web服务非常有用的时候给外部资源提供一些访问权限.例如,现在一天的大多数应用程序对于Web和移动设备都是通用的,因此此时您将使用Web服务.

使用Jquery调用速度更快,然后像使用c#.net页面一样回发调用以获取响应.
1. If there is desktop application which is installed on multiple pc and that application interact with single database at that time you have to use web service concept.

2. Web Application => you have to give access some outside the resources at time web service is very useful. For example Now a day most of application are common for web and mobile device so at this point you use web service.

Using Jquery call is faster then post back call like using c#.net page to get response.


Kaushal是正确的.这将取决于您要获取的数据量.
通常,WebMethod比从数据库访问数据的代码隐藏"方法要快.它还为您提供了不回发表单的优点.

所以,由您决定.确定是否要让用户体验更快的界面,而不是回发界面.
Kaushal is correct. It would depend upon the amount of data you are fetching.
Normally, WebMethod is faster than the Code Behind method of accessing the data from database. It also gives you the advantage of not Post Backing the form.

So, upto you. Decide whether you want user to experience a quicker and not Post Back interface or not.


这篇关于何时使用web方法从datbase中获取数据的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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