代码改变世界

老忘的WebConfig连接字串格式

2010-01-23 19:16  三皮开发时  阅读(198)  评论(0)    收藏  举报

1.

    <connectionStrings>
        <add name="db_StudentConnectionString" connectionString="Data Source=.;Initial Catalog=db_Student;Integrated Security=True"/>
    </connectionStrings>

 

Data Source=192.168.2.5;Initial Catalog=UserManagement;User ID=sopdb_user;Password=***

也是<ConnectionString/>下的 连接

2.

 <add key="ConnectionString" value="server=a\mr;database=db_NetStore;UId=sa;password=''"/>

3.

     数据库不能以用户名登录解决:

        1.进入到SQL配置管理器,找到SQLEXPRESS 的协议 并启用 Name Pipes 和 tcp/ip  状态

        2.SQL2005 服务 重新启动SQL 服务.

        3.检查用户属性,状态 将登录启用 OK.