当前位置: 技术问答>java相关
一个asp程序改写成jsp,把数据库改为sqlserver。谢谢阿!
来源: 互联网 发布时间:2017-03-19
本文导语: % if session("username")="" then session("errinfo")="请先登陆!" response.redirect "error.asp" end if set conn=server.createobject("adodb.connection") conn.open "jtnh17921" theoption=request("radiobutton") if theoption="khbh" then khbh=request("khbh") set r...
%
if session("username")="" then
session("errinfo")="请先登陆!"
response.redirect "error.asp"
end if
set conn=server.createobject("adodb.connection")
conn.open "jtnh17921"
theoption=request("radiobutton")
if theoption="khbh" then
khbh=request("khbh")
set rs=conn.execute("select * from user where 客户编号='"+khbh+"'")
if rs.eof then
set rs=conn.execute("select * from newuser where 客户编号='"+khbh+"'")
if rs.eof then
session("errinfo")="请输入正确的用户编号!"
response.redirect "error.asp"
else
newuser="y"
end if
end if
elseif theoption="cdno" then
cdno=request("cdno")
set rs=conn.execute("select * from user where 理财卡卡号='"+cdno+"'")
if rs.eof then
set rs=conn.execute("select * from newuser where 理财卡卡号='"+cdno+"'")
if rs.eof then
session("errinfo")="请输入正确的理财卡卡号!"
response.redirect "error.asp"
else
newuser="y"
end if
end if
else
sfzh=request("sfzh")
set rs=conn.execute("select * from user where 身份证号码='"+sfzh+"'")
if rs.eof then
set rs=conn.execute("select * from newuser where 身份证号码='"+sfzh+"'")
if rs.eof then
session("errinfo")="请输入正确的身份证号码!"
response.redirect "error.asp"
else
newuser="y"
end if
end if
end if
set rs1=conn.execute("select * from totaluserbill where 客户编号='"+rs("客户编号")+"'")
set rs2=conn.execute("select * from bankaccount where 客户编号='"+rs("客户编号")+"'")
set rs3=conn.execute("select * from bill where 客户编号='"+rs("客户编号")+"'")
session("khbh")=rs("客户编号")
session("cdno")=rs("理财卡卡号")
%>
if session("username")="" then
session("errinfo")="请先登陆!"
response.redirect "error.asp"
end if
set conn=server.createobject("adodb.connection")
conn.open "jtnh17921"
theoption=request("radiobutton")
if theoption="khbh" then
khbh=request("khbh")
set rs=conn.execute("select * from user where 客户编号='"+khbh+"'")
if rs.eof then
set rs=conn.execute("select * from newuser where 客户编号='"+khbh+"'")
if rs.eof then
session("errinfo")="请输入正确的用户编号!"
response.redirect "error.asp"
else
newuser="y"
end if
end if
elseif theoption="cdno" then
cdno=request("cdno")
set rs=conn.execute("select * from user where 理财卡卡号='"+cdno+"'")
if rs.eof then
set rs=conn.execute("select * from newuser where 理财卡卡号='"+cdno+"'")
if rs.eof then
session("errinfo")="请输入正确的理财卡卡号!"
response.redirect "error.asp"
else
newuser="y"
end if
end if
else
sfzh=request("sfzh")
set rs=conn.execute("select * from user where 身份证号码='"+sfzh+"'")
if rs.eof then
set rs=conn.execute("select * from newuser where 身份证号码='"+sfzh+"'")
if rs.eof then
session("errinfo")="请输入正确的身份证号码!"
response.redirect "error.asp"
else
newuser="y"
end if
end if
end if
set rs1=conn.execute("select * from totaluserbill where 客户编号='"+rs("客户编号")+"'")
set rs2=conn.execute("select * from bankaccount where 客户编号='"+rs("客户编号")+"'")
set rs3=conn.execute("select * from bill where 客户编号='"+rs("客户编号")+"'")
session("khbh")=rs("客户编号")
session("cdno")=rs("理财卡卡号")
%>
|
看不懂你最后三个rs1,rs2,rs3的用处