SQL 連線字串 參考頁

From: http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=49029

I have to develop an application such that i have to use the port number in the sql connection string in asp.net.How to specify the string plz help me out.

One way to do it is to connect via the IP address.

“Data Source=122.122.122.122,1433;Network Library=DBMSSOCN;Initial Catalog=Northwind;User ID=YourUser Password=YourPassGoesHere;"

(DBMSSOCN=TCP/IP instead of Named Pipes, at the end of the Data Source is the port to use (1433 is the default))

Here’s a great site for more info: http://www.connectionstrings.com/

Advertisements

發表迴響

在下方填入你的資料或按右方圖示以社群網站登入:

WordPress.com Logo

您的留言將使用 WordPress.com 帳號。 登出 / 變更 )

Twitter picture

您的留言將使用 Twitter 帳號。 登出 / 變更 )

Facebook照片

您的留言將使用 Facebook 帳號。 登出 / 變更 )

Google+ photo

您的留言將使用 Google+ 帳號。 登出 / 變更 )

連結到 %s