rs.open "select 1 from tableA where a=1 and b=1 and c between 1 and 10",cn
if not rs.eof then
msgbox "数据库中已经存在相应记录,请重新输入"
else
cn.execute"insert into tableA........."
end if
<!--#include file="../Connections/myconn.asp" -->
<%
Set rs = Server.CreateObject("ADODB.Recordset")
for i=1 to 10
sql="select * from A where a='1' and b='1' and c='"& i &"'"
rs.Open SQL,adocon,2,3
if rs.eof then
rs.close
sql="insert into A(a,b,c) values('1','1','"& i &"')"
rs.Open SQL,adocon,2,3
else
rs.close
'提示输错
end if
next
%>