注册 登录
编程论坛 ASP技术论坛

在ASP中能用if not(rs.bof and rs.eof) thn可判断新增记录时有重复记录

sylknb 发布于 2015-05-15 19:12, 2199 次点击
在ASP中能用if not(rs.bof and rs.eof) thn可判断新增记录时有重复记录


if not(rs.bof and rs.eof) thnd
  已同名存在
else
  正常执行插入语句
end if


为什么?
2 回复
#2
hu9jj2015-05-16 08:25
前面应该有记录的查询语句。查到有相同的记录,则表的指针会确定在相应的记录。查不到相同的记录,则表的指针会在末尾,即eof()=.t.。
#3
sylknb2015-05-16 09:23
是的,前面有SQL查询语句。谢谢明白了
1