用户名登录和windows帐户连接sql server数据库的不同

用户登录:
<add name="DefaultConnectionString1" providerName="System.Data.SqlClient" connectionString="server=192.168.0.x\SQLEXPRESS2008R2;database=BOS;uid=sa;pwd=12345"/>


windows帐户登录:
<add name="DefaultConnectionString2" providerName="System.Data.SqlClient" connectionString="server=localhost\SQLEXPRESS;Integrated Security=SSPI;database=BOS"/>

 

 

 'Access 2000的連接
    strConn = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & App.Path & "/North.mdb;Persist Security Info=False"

 


    'SQL Server2000的連接
    strConn = "Provider=SQLOLEDB.1;Persist Security Info=False;User ID=develop; password=12345;Data Source=ServerName"

 

你可能感兴趣的:(用户名登录和windows帐户连接sql server数据库的不同)