自己再写了个文件:
<%
Set hbwl=Server.CreateObject("hbwlAspDll.dbClass")
if err<>0 then
response.Write("对不起!<br /><br />请先在你服务器的这个位置"&server.MapPath("./")&"<br /><br />双击“<font color=red>注册组件.bat</font>”这个文件进行hbwlAspDll组件注册。<br /><br />谢谢!")
response.end
end if
hbwl.dbType="ACCESS" '数据库类型,可设置SQL或ACCESS
select case UCase(hbwl.dbType)
case "ACCESS":
'是ACCESS数据库时需设置的数据库路径及名称
hbwl.database="database\#dazi.mdb" '数据库路径及数据库名
case "SQL":
'是SQL数据库时需设置的内容
hbwl.sqlservername=".\sqlexpress"
hbwl.database="dazi"
hbwl.sqluid="sa"
hbwl.sqlpwd="sa123456"
end select
hbwl.connOpen '打开数据库
select case caozuo
case "select":
sql="select 积分 from 用户 where 登录账号='"&username&"' and 登录密码='"&userpass&"'"
response.Write(hbwl.dbShsl(sql))
'response.Write(sql)
case "update":
hbwl.conn.execute("update 用户 set 积分=积分-300 where 登录账号='"&username&"' and 登录密码='"&userpass&"'")
response.Write("True")
case "":
response.Write("<script>parent.location.href='index.asp';</script>")
end select