asp 连接sqlserver2008问题
Application("SHOPconn") = "PROVIDER=SQLOLEDB;DATA SOURCE=monde.com.cn\SQLEXPRESS;database=test;User Id=sa;PASSWORD=2012;"
Microsoft OLE DB Provider for SQL Server 错误 '80004005'
[DBNETLIB][ConnectionOpen (Connect()).]SQL Server 不存在或拒绝访问。
/_dll/system.asp,行 115
sql2008…..的数据库,怎么连不上,本地可以
------解决方案--------------------我自己的刚弄好
<%
Dim sql_databasename,sql_password,sql_username,sql_localname
sql_localname = "(local)"
sql_databasename = "test"
sql_username = "sqladmin"
sql_password = "sqladmin"
connstr = "Provider = Sqloledb; User ID = " & sql_username & "; Password = " & sql_password & "; Initial Catalog = " & sql_databasename & "; Data Source = " & sql_localname & ";"
Set conn = Server.CreateObject("ADODB.Connection")
conn.open connstr
%>
-------------------
sql_localname = "
(local)"
我的改成127.0.0.1不行,你两者都试试。
注意是(local),不是local