[求助]数据库连接出错,请检查连接字串。
数据库连接出错,请检查连接字串。这个是什么原因?
Dim Conn,Connstr
Dim Sqldatabase,Sql_pass_word,Sql_User_ID,Sql_Data_Source
Sqldatabase="www_videojob_Data"
Sql_pass_word="admin"
Sql_User_ID="admin"
Sql_Data_Source="(local)"
Set Conn = Server.CreateObject("ADODB.Connection")
ConnStr = "Provider=SQLOLEDB.1;Password='"&Sql_pass_word&"';Persist Security Info=False;User ID='"&Sql_User_ID&"';Initial Catalog='"&Sqldatabase&"';Data Source='"&Sql_Data_Source&"'"
Conn.Open Connstr
Function CloseDB
Conn.close
Set conn = Nothing
End Function
Function CloseRs
Rs.Close
Set Rs = Nothing
End Function