如何在web.config中连接数据库? [英] How to connect Database in web.config?

查看:132
本文介绍了如何在web.config中连接数据库?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经尝试了这个

I already try this

<configuration>
  <connectionStrings>
    <add name="ConString" connectionString="Data Source=localhost;Initial Catalog=Inventory;Integrated Security=True;" providerName="System.Data.SqlClient" />
  </connectionStrings> 
    <system.web>
      <compilation debug="true" targetFramework="4.5" />
      <httpRuntime targetFramework="4.5" />
    </system.web>

</configuration>





但不工作,任何建议......



but not work, any suggestion....

推荐答案

您可以使用网络服务查询。

这对您来说很简单..



查看CP中的smiler帖子



android和asp.net之间的数据库连接。 [ ^ ]
You can check using web service.
That will be easy for you..

Check the smiler post in CP

Database connection between android and asp.net.[^]


这篇关于如何在web.config中连接数据库?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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