http://www.able-consulting.com/dotnet/adonet/Data_Providers.htm"Server=(local);Database=aaaa;uid=oa;pwd=oa;"

解决方案 »

  1.   

    连接本地数据库
    SqlConnection thisConnection = new SqlConnection("Server=(local);Database=aaaa;uid=oa;pwd=oa");远程数据库
    using System.Data.SqlClient;
    ...
    SqlConnection oSQLConn = new SqlConnection();
    oSQLConn.ConnectionString = "Data Source=(local);" +
                                "Initial Catalog=mySQLServerDBName;" +
                                "Integrated Security=SSPI";
    oSQLConn.Open();
    当然saucer(思归,Ms.Net MVP)已经说的很清楚了