<html>
<head>
<title></title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
</head>
<body >
<%
ConnStr=不同的数据库连接字符串不同
Set Rs = Server.CreateObject("adodb.recordset")
sql="select top 1 * from 表 where order='"&Request.form("zsbh")&"'"
Rs.Open Sql,ConnStr
if not rs.eof then
response.write "<script language=javascript>alert('已经存在记录!');history.back();</script>"
response.end
else 做你要做的
end if
Rs.Close()
set Rs=nothing
%>