这个代码如何实现有相同记录就不新增!

来源:百度知道 编辑:UC知道 时间:2024/05/29 02:58:04
conn.Execute="Insert Into [ua]([uacount]) Values('"&uas&"')"
这个代码如何实现有相同记录就不新增记录!

set rs=server.createobject("adodb.recordset")
rs.open "select from [ua] where uacount='"&uas&"'",conn,1,3
if rs.bof and rs.eof then
conn.Execute="Insert Into [ua]([uacount]) Values('"&uas&"')"
else
response.write("有新记录")
end if
rs.close

加个限制条件