如何在服务中编写连接 [英] How to write connection in Service
本文介绍了如何在服务中编写连接的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
如何在服务中编写代码连接字符串以获取数据库中的信息.
并绑定表.给我源代码
How to write code connection string in service getting information in database.
and bind the table. give me source code
推荐答案
请通过 ^ ].
下载源代码(通过在此处创建帐户)并从中学习.
另一篇好文章 Asp.net WebService或在ASP中创建和使用WebService .net或在asp.net中创建和调用webservice或如何在asp.net中创建webservice以及如何使用webservice [
Please go through How to Return a DataTable From WCF Service[^].
Download the source code (by creating an account there) and learn from that.
Another good article Asp.net WebService or Creating and Consuming WebService in asp.net or Create and call webservice in asp.net or how to create webservice and how to use webservice in asp.net[^]
在这里我们需要在web.config中设置数据库连接,因为在这里我从web.config获取数据库连接
Here we need to set the database connection in web.config because here I am getting database connection from web.config
<connectionstrings>
<add name="dbconnection" connectionstring="Data Source=SureshDasari;Integrated Security=true;Initial Catalog=MySampleDB" />
</connectionstrings>
谢谢...
这篇关于如何在服务中编写连接的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文