<%
dim conn
dim connstr
dim db
db="
Set conn = Server
connstr="Provider=Microsoft
conn
sub closedatabase()
conn
set conn=Nothing
End sub
%>
<title>錯誤提示</title>
<meta http
<%
dim founderr
founderr=false
errmsg=""
if Request
if request
sql="select * from p_class_small"
set rs=server
rs
rs
dim p_small_type
p_small_type=trim(replace(request
p_type=trim(replace(request
p_small_type_e=trim(replace(request
if p_small_type="" then
founderr=true
errmsg=errmsg+"<br>"+"<li>你必須輸入欄目名稱名稱!"
else
rs("p_small_type")=p_small_type
End if
if p_type="" then
founderr=true
errmsg=errmsg+"<br>"+"<li>你必須選擇一級分類!"
else
rs("p_type")=p_type
End if
sql_p="select p_type_e from p_class where p_type=
set rs_p=server
rs_p
if Not(rs_p
p_type_e=rs_p("p_type_e")
end if
rs_p
set rs_p=nothing
rs("p_type_e")=p_type_e
rs("p_small_type_e")=p_small_type_e
if Not founderr then
rs
rs
set rs=Nothing
closedatabase
response
else
Call diserror()
response
End if
End if
if request
if request
founderr=true
errmsg=errmsg+"<br>"+"<li>你必須指定操作的對象!"
else
if Not isInteger(request
founderr=true
errmsg=errmsg+"<br>"+"<li>非法的id參數
End if
End if
if founderr then
Call diserror()
response
End if
sql="select * from p_class_small where p_small_id="&cint(request
set rs=server
rs
p_old_small_type=rs("p_small_type")
p_old_small_type_e=rs("p_small_type_e")
p_small_type=trim(replace(request
p_type=trim(replace(request
p_small_type_e=trim(replace(request
p_type_e=trim(replace(request
if p_small_type="" then
founderr=true
errmsg=errmsg+"<br>"+"<li>你必須輸入欄目名稱!"
else
rs("p_small_type")=p_small_type
End if
if p_type="" then
founderr=true
errmsg=errmsg+"<br>"+"<li>你必須選擇一級分類!"
else
rs("p_type")=p_type
End if
sql_p="select p_type_e from p_class where p_type=
set rs_p=server
rs_p
if Not(rs_p
p_type_e=rs_p("p_type_e")
end if
rs_p
set rs_p=nothing
rs("p_type_e")=p_type_e
rs("p_small_type_e")=p_small_type_e
if Not founderr then
rs
rs
set rs=Nothing
連代更新屬於此小類的信息
v_sql="select * from p_info where p_small_type=
set v_rs=server
v_rs
if Not(v_rs
do while not v_rs
v_rs("p_small_type")=p_small_type
v_rs("p_small_type_e")=p_small_type_e
v_rs
v_rs
loop
End if
v_rs
set v_rs=Nothing
response
else
Call diserror()
response
End if
End if
if request
if request
founderr=true
errmsg=errmsg+"<br>"+"<li>你必須指定操作的對象!"
else
if Not isInteger(request
founderr=true
errmsg=errmsg+"<br>"+"<li>非法的id參數
End if
End if
if founderr then
Call diserror()
response
End if
sql="select * from p_class_small where p_small_id="&cint(request
set rs=server
rs
if Not(rs
rs
End if
rs
set rs=Nothing
連代刪除屬於此分類的信息
v_sql="select * from p_info where p_small_type=
set v_rs=server
v_rs
if Not(v_rs
do while not v_rs
v_rs
v_rs
loop
End if
v_rs
set v_rs=Nothing
closedatabase
response
End if
End if
Call p_small_body()
closedatabase
%>
From:http://tw.wingwit.com/Article/program/net/201311/14121.html