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
- nacos Connection refused (Connection refused)
- Connection
- java.net.ConnectException: Connection refused (Connection refused)JavaException
- Error:Can't connect to SOCKS proxy:Connection refused (Connection refused)Error
- nmcli connection reload
- yarn socket connection timeoutYarn
- 關於Residual Connection
- 684-Redundant Connection
- Connection could not be established with host 求救
- Check connection related issue of mysqlMySql
- SQLserver With As 用法SQLServer
- sqlserver docSQLServer
- sqlserver 拆分SQLServer
- ascp: Failed to open TCP connection for SSH, exiting. Session Stop (Error: Failed to open TCP connection for SSH)AITCPSessionError
- MySQL異常刨析:ata source rejected establishment of connection, message from server: “Too many connectionMySqlServer
- MySQL:Lost connection to MySQL server at 'readingMySqlServer
- Dr.Elephant mysql connection errorMySqlError
- OGG Director報錯 Connection FAILEDAI
- [20190530]sqlplus preliminary connection.txtSQL
- Please specify (single) host string for connection:
- SQLServer批量更新SQLServer
- SqlServer 2005 TriggerSQLServer
- phpstudy支援sqlserverPHPSQLServer
- SQLServer注入技巧SQLServer
- SQLSERVER SELECT(zt)SQLServer
- SqlServer 操作 JSONSQLServerJSON
- SQLServer MERGE 用法SQLServer
- sqlserver的坑SQLServer
- Python操作SQLServerPythonSQLServer
- go get報錯connect: connection refusedGo
- 如何區分 Connection、Thread和SessionthreadSession
- [network][easy case]troubleshoting the connection to a remote serverREMServer
- Lost connection to MySQL server at 'reading authorization packet'MySqlServer
- Error: Connection activation failed: Device not managed by NetworkManagerErrorAIdev
- Leetcode 685. Redundant Connection II JavascriptLeetCodeJavaScript
- SSL - SSLHandshakeException: Unrecognized SSL message, plaintext connection?ExceptionZedAI
- SSH出現Connection refused錯誤