+ -
当前位置:首页 → 问答吧 → asp+access插入数据问题

asp+access插入数据问题

时间:2011-12-13

来源:互联网

asp页面代码如下:
  dim rs:set rs=Server.CreateObject("adodb.recordset")
  rs.Open "select * from from_info",conn,1,3
  rs.addnew()
  rs("fromip")=Request.ServerVariables("Remote_Addr") 
  rs("fromurl")=Request.ServerVariables("HTTP_REFERER")
  rs.update
  rs.close
  conn.close

  response.Write Request.ServerVariables("HTTP_REFERER")

页面没有报错,但是执行之后发现只插入了"fromip"字段,而"fromurl"字段没有插入到数据库的表中

这是为什么呢?

作者: ytmcel4721274   发布时间: 2011-12-13

Request.ServerVariables("HTTP_REFERER") 这个数据为空哦

入库的时候 你可以输出看下

作者: enjoy_gw   发布时间: 2011-12-13

response.Write Request.ServerVariables("HTTP_REFERER")
最后一句不是输出了吗,难道有内容?

作者: theforever   发布时间: 2011-12-13