求助,版主的搜索代码换成SQL数据库就不行了,,为什么?那些地方要改么?下面是SQL链接代码
<%@LANGUAGE=VBScript%>
<%
Dim ConnStr,conn
Dim SqlDatabaseName,SqlPassword,SqlUsername,SqlLocalName
SqlDatabaseName = "list"
SqlPassword =""
SqlUsername = "sa"
SqlLocalName = "127.0.0.1"
ConnStr = "PROVIDER=SQLOLEDB;DATA SOURCE="&SqlLocalName&";UID="&SqlUsername&";PWD="& SqlPassword&";DATABASE="&SqlDatabaseName
On Error Resume Next
set conn=Server.CreateObject("ADODB.Connection")
'response.write ConnStr
if err then
err.clear
else
conn.open connstr
end if
sub CloseConn()
conn.close
set conn=nothing
end sub
%>