mssql数据库链接问题
Microsoft OLE DB Provider for ODBC Drivers 错误 '80040e21' ODBC 驱动程序不支持所需的属性。
/index.asp,行 19
这是那错了啊!
部分代码!
<!--#include file="Inc/SqlIn_UTF.Asp"--><%
dim conn,db,connstr,DBName,DBServer,DBUser,DBPassword
'--------------------请在下面修改数据库访问参数
DBServer="58.23.31.98" 'KL_SQL_SERVERIP '数据库主机IP
DBName="sqlccokp" 'KL_Main_DatabaseName '数据库名
DBUser="gollop" 'KL_SQL_UserName
DBPassword="08250" 'KL_SQL_PassWord
'---------------------修改参数结束
'on error resume next
connstr="driver={SQL Server};database="&DBName&";Server="&DBServer&";uid="&DBUser&";pwd="&DBPassword
set conn=server.createobject("ADODB.CONNECTION")
if err then
err.clear
else
conn.open connstr
end if
'关数据库
sub CloseConn()
'if IsObject(conn) and IsNull(conn) then
'response.write "llllllllllllllllllllllllllllllllllllll"
conn.close
set conn=nothing
'end if
end sub
'取域名
function getDomainName()
set rsnickname=conn.execute("select domain from [domainname] where id=1")
if not rsnickname.eof then
getDomainName=rsnickname("domain")
else
getNickName="
end if
rsnickname.close
set rsnickname=nothing
end function
'getMoneyName取网站币种
function getMoneyName(moneyid)
dim temp
set rsnickname=conn.execute("select sitemoneyname from [user] where userid="&moneyid)
if not rsnickname.eof then
temp=rsnickname("sitemoneyname")
end if
rsnickname.close
set rsnickname=nothing
if isNull(temp) or temp="" then temp="积分" end if
getMoneyName=temp
end function
function getMoney(tousername)
dim temp
set rsnickname=conn.execute("select money from [user] where username='"&username&"'")
if not rsnickname.eof then
temp=rsnickname("money")