📄 modifybook.asp
字号:
<%'---------------------------------------------------------------
' AspStudio_Codepage="936"
' 上面这行是软件使用的代码页标记,请不要删除。详情请参考帮助文件。
'
' 档案名称:modifybook.asp
' 原创作者:dan
' 作者邮件:
' 创建日期:星期六,2008年12月06日 13:06:17
' 版权所有(C)Lenovo
'--------------------------------------------------------------%>
<HTML>
<HEAD>
<Title>seekbook.asp</Title>
<META http-equiv="Content-Type" content="text/html; charset=gb2312">
<META name="Generator" content="Asp Studio 1.0">
</HEAD>
<BODY>
<%
'请在这里输入您的ASP代码
Dim bID,bName,bPub,bDate,bAuthor,bMem
Dim sql
bID=Request.Form("bID")
bID=Replace(bID,"'","''",1,-1,vbTextCompare)
bName=Request.Form("bName")
bName=Replace(bName,"'","''",1,-1,vbTextCompare)
bPub=Request.Form("bPub")
bPub=Replace(bPub,"'","''",1,-1,vbTextCompare)
bDate=Request.Form("bDate")
bAuthor=Request.Form("bAuthor")
bAuthor=Replace(bAuthor,"'","''",1,-1,vbTextCompare)
bMem=Request.Form("bMem")
bMem=Replace(bMem,"'","''",1,-1,vbTextCompare)
if Len(bID)>30 then
Response.Write("2")
Response.End()
else
end if
if Len(bName)>30 then
Response.Write("2")
Response.End()
else
end if
if Len(bPub)>30 then
Response.Write("2")
Response.End()
else
end if
if Len(bAuthor)>20 then
Response.Write("2")
response.End()
else
end if
if Len(bMem)>30 then
Response.Write("2")
Response.End()
else
end if
if NOT IsDate(bDate) then
Response.Write("2")
Response.End()
else
end if
if bID="" then
Response.Write("2")
Response.End()
else
end if
if bName="" then
Response.Write("2")
Response.End()
else
end if
if bPub="" then
Response.Write("2")
Response.End()
else
end if
if bAuthor="" then
Response.Write("2")
response.End()
else
if bMem="" then
Response.Write("2")
Response.End()
else
Dim rs
Set rs=Session("s_DBConn").Execute("select * from bookTable where bID='"&bID&"'")
if rs.EOF then
Response.Write("1")
else
sql="update bookTable set bName='"&bName&"',bPub='"&bPub&"',bDate='"&bDate&"',bMem='"&bMem&"',bAuthor='"&bAuthor&"'where bID='"&bID&"'"
Session("s_DBConn").Execute(sql)
Response.Write("0")
end if
rs.Close()
Set rs=Nothing
end if
end if
%>
</BODY>
</HTML>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -