asp 中怎样转到ID值最大的页

来源:百度知道 编辑:UC知道 时间:2024/05/29 06:17:24
if Src_ID = "" or isnumeric(Src_ID) = false then
Response.Redirect("http://192.168.19.88/v/SrcShowbak.asp?Src_ID=这里想加上一个变量,取最大值,使其转入最新的页")
Response.End()
end if

注:表名 WoWo_Source 字段名 Src_ID

'注意前面省略了建立数据连接conn和rs
if Src_ID = "" or isnumeric(Src_ID) = false then
rs.open "SELECT TOP 1 Src_ID FROM WoWo_Source ORDER BY Src_ID DESC", Conn, 0, 1
Src_ID = rs("Src_ID")
rs.close
Response.Redirect("http://192.168.19.88/v/SrcShowbak.asp?Src_ID="&Src_ID)
Response.End()
end if