日期:2014-05-17  浏览次数:21009 次

SQL连接问题
SQL连接错误吗?


set   Conn=server.createobject( "ADODB.connection ")
Conn.ConnectionString   = "Provider=SQLOLEDB.1;Password=123;Persist   Security   Info=True;User   ID=love;Initial   Catalog=love;Data   Source=218.*.*.*;Connect   Timeout=15 "
Conn.Open

显示
错误类型:
Microsoft   OLE   DB   Provider   for   SQL   Server   (0x80004005)
[DBNETLIB][ConnectionOpen   (ParseConnectParams()).]无效的连接。

------解决方案--------------------
dim connstr
dim conn
connstr = "Provider=SQLOLEDB;Data Source=218.*.*.*;DATABASE=Northwind;UID=sa;pwd=*** "
Set conn = Server.CreateObject( "ADODB.Connection ")
conn.Open connstr