当前位置: 代码迷 >> Sql Server >> 新手提问....解决办法
  详细解决方案

新手提问....解决办法

热度:79   发布时间:2016-04-27 21:18:01.0
新手提问....

      dim   a
      a   =   Request.QueryString( "sid ")
      a   =   replace(a, " ' ", " ' ' ")  

str= "SELECT   *   FROM   radiocallers   where   caller= ' "   &   a     &   " ' "
set   rs=cnn.execute(str)  

我想如果查不到这个数据的话就在表radiocallers里添加进这个数据,该怎么写呀?

------解决方案--------------------
if not rs.eof then
......
end if

可以用ado的rs.addnew方法
也可以直接用sql语句 直接conn.execute
  相关解决方案