This is a sample connection string which you can use with MS SQL 2005 / 2008 under ASP:

<%

dim conn
dim rs

strConn = "Driver={SQL Server};Server=YYYY;Database=XXXX;uid=XXXX;pwd=XXXX"
Set cnt = Server.CreateObject("ADODB.Connection")
cnt.ConnectionString= strConn
cnt.Open

%>

Database server = YYYY - You need to use the server address listed in "Database server" field when you were creating your database in Plesk.

For security reasons, we have changed specific settings with XXXX

NOTE: You MUST include the full database name, which consit of the user prefix and the name that you have given, for example XXX_DB
這篇文章有幫助嗎? 44 用戶發現這個有用 (168 投票)