modifydirectionsave.asp

来自「asp的新闻网站」· ASP 代码 · 共 48 行

ASP
48
字号
<%@ Language=VBScript %>
 <!--#include file="../include/odbc.asp" -->
<!--#include file="../include/killStr.asp" -->
<!--#include file="../include/checkUser.asp" -->
<!--#include file="../include/checkServer.asp" -->
<%
'修改:潘树文
'时间:2001年2月9日
%>
<%
Dim directionName
directionName = Request.Form("Name")

%>


<%
Dim rs
Dim sql
Set rs=server.CreateObject("adodb.RecordSet")
rs.LockType = 3
rs.CursorType = 3 
sql = "Select * From weather_direction Where directionName = '" & directionName & "'"
rs.Open sql,conn
if rs.eof then  
    Set rs=server.CreateObject("adodb.RecordSet")
    rs.LockType = 3
    rs.CursorType = 3 
    sql="SELECT * FROM weather_direction Where directionID='" & Request.Form("id") & "'"
    rs.Open sql,conn
    rs("directionName") = directionName
    rs.Update
    rs.close
    Set rs = nothing
    conn.close
    Set conn = nothing
    Response.redirect "directionList.asp"
else Response.Write("<script>alert('对不起,此风向已经存在,请重新输入!');history.go(-1)</script>")
		Response.End
		rs.Close
		Set rs = nothing
		conn.close
		Set conn = nothing
end if 
%>


⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?