一个页面内多个数据库操作,请帮帮忙!
我的本意是,检测到sn和password的值与数据库内的值相同时,并且sn和password的位数等于8位时
进行另外一个数据库的操作(2个不同的数据库)。也就是在
if password=rs("pwd") and sn=rs("sn") and a=8 and b=8 then
之后的那一段
但是不知道怎么在一个页面内完成多个数据库的操作,请大家帮帮忙好吗?
<%
dim sql
dim rs
dim sn
dim password
dim access
sn=trim(request.Form("txtsn"))
password=(trim(Request.Form("txtpwd")))
%>
<!--#include file="conn1.asp"-->
<%
a=(len(password))
b=(len(sn))
sql="select * from main "
rs.open sql,conn,1,1
if not(rs.bof and rs.eof) then
if password=rs("pwd") and sn=rs("sn") and a=8 and b=8 then
.........''另一个数据库的操作
response.write("OK")
else
call Error
end if
else
call Error()
end if
rs.close
conn.close
set rs=nothing
set conn=nothing
%>
<%sub Error() %>
<script language="JavaScript">
alert(' error')
window.history.go(-1);
</script>
<%end sub%>