连接字符串

1.asp 连接字符串
 SQL2005: Const cnnString = "Provider=SQLNCLI;Server=.;Database=master;Uid=sa;Pwd=hehe;"
 SQL2000: Const cnnString = "Provider=SQLOLEDB.1;Password=hehe;Persist Security Info=True;User ID=sa;Initial Catalog=master;Data Source=."

2.net 连接字符串

<add key="ConnectionString" value="Data Source=.;Initial Catalog=master;User Id=sa;Password=hehe;" />

windows 认证:
   <connectionStrings>
        <add name="ConnectionString"
            connectionString="Data Source=.;Initial Catalog=master;Integrated Security=True"
            providerName="System.Data.SqlClient" />
    </connectionStrings>


你可能感兴趣的:(字符串)