sqlserver Connection
以本地伺服器(LocalHost),資料庫(Northwind)為例,可以有以下一些連線方式
SqlConnection conn=new SqlConnection( "Server=LocalHost;Integrated Security=SSPI;Database=Northwind");
SqlConnection conn = new SqlConnection("Data Source=LocalHost;Integrated Security=SSPI;Initial Catalog=Northwind;");
SqlConnection conn = new SqlConnection(" Data Source=LocalHost;Initial Catalog=Northwind;Integrated Security=SSPI;Persist Security Info=False;Workstation Id=XURUI;Packet Size=4096; ");
SqlConnection myConn = new SqlConnection("Persist Security Info=False;Integrated Security=SSPI;Database=northwind;Server=LocalHost");
SqlConnection conn = new SqlConnection(" Uid=sa;Pwd=***;Initial Catalog=Northwind;Data Source=LocalHost;Connect Timeout=900");
SqlConnection myConn = new SqlConnection("Persist Security Info=False;Integrated Security=SSPI;Database=northwind;Server=LocalHost");
SqlConnection conn = new SqlConnection(" Uid=sa;Pwd=***;Initial Catalog=Northwind;Data Source=LocalHost;Connect Timeout=900");
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/16436858/viewspace-676266/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- SQLServer映象報錯Connection handshake failedSQLServerAI
- SQLServer搭建域控下映象報錯Connection handshake failedSQLServerAI
- java.net.ConnectException: Connection refused (Connection refused)JavaException
- mysql connection refusedMySql
- XDMCP connection failsAI
- Error:Can't connect to SOCKS proxy:Connection refused (Connection refused)Error
- 解決java connectionJava
- Connection (建立連線)
- Connection/Session/Server ProcessesSessionServer
- nmcli connection reload
- 求教:connection.close()與connection = null的區別是什麼?Null
- SQLserver With As 用法SQLServer
- sqlserver docSQLServer
- sqlserver 拆分SQLServer
- SqlServer——索引SQLServer索引
- sqlserver 改名SQLServer
- Connection could not be established with host 求救
- Check connection related issue of mysqlMySql
- .net sql connection pool leakSQL
- JDBC Connection Pool Example (轉)JDBC
- SQLServer批量更新SQLServer
- SQLServer注入技巧SQLServer
- sqlserver的坑SQLServer
- 【SQLServer】Filegroup is fullSQLServer
- sqlserver時間SQLServer
- SQLServer 行數SQLServer
- sqlserver的MinLSNSQLServer
- sqlServer基礎SQLServer
- SqlServer N字首SQLServer
- [SQLSERVER] sqlserver T-SQL 執行detach/attach,copy 命令SQLServer
- Dr.Elephant mysql connection errorMySqlError
- connection和session的關係Session
- ERROR: UTL_SMTP.OPEN_CONNECTIONError
- Connection reset by peer: socket write errorError
- IOException in sending Request :: Connection refusedException
- Connection with Administrator Privileges (286)
- MySQL異常刨析:ata source rejected establishment of connection, message from server: “Too many connectionMySqlServer
- SQLSERVER下載地址SQLServer