当前位置: 代码迷 >> ASP >> 'date' 不是可以识别的 函数名,该如何处理
  详细解决方案

'date' 不是可以识别的 函数名,该如何处理

热度:961   发布时间:2012-02-21 16:26:23.0
'date' 不是可以识别的 函数名



错误类型:
Microsoft   OLE   DB   Provider   for   SQL   Server   (0x80040E14)
'date '   不是可以识别的   函数名。
/office/tpjs.asp,   第   12   行


<!--#include   file   =   admin_conn.asp   -->
<%
xuastp=trim(request( "xuastp "))
id=trim(request( "id "))
if   id= " "   then   id=0
vtp=trim(request( "vtp "))
action=trim(request( "action "))
userip   =   Request.ServerVariables( "HTTP_X_FORWARDED_FOR ")
If   userip   =   " "   Then   userip   =   Request.ServerVariables( "REMOTE_ADDR ")
if   xuastp <> " "   and   action= "tp "   then
Set   rs   =   Server.CreateObject( "ADODB.RecordSet ")
rs.Open   "select   *   from   [tpip]   where   ip= ' "&userip& " '   and   addtime=date()   and   tpid= "&clng(id)& "   order   by   id   desc ",conn,1,1
if   rs.recordcount=0   then
Set   rs   =   Server.CreateObject( "ADODB.RecordSet ")
rs.Open   "select   *   from   [tp]   where   id= "&id,conn,1,3
if   rs.recordcount <> 0   then
rs(xuastp)=rs(xuastp)+1
rs.update
vtp=rs( "vtp ")
id=rs( "id ")
end   if
rs.close
set   rs=nothing
Response.Write   " <BR> <BR> <BR> <Center> <font   style= 'font-size:10.5pt '> 投票成功!感谢你的支持! </font> "
conn.Execute   "insert   into   [tpip]   ([ip],[addtime],[tpid])   values( ' "&userip& " ',date(), "&id& ") "
Else
        Response.Write   " <BR> <BR> <BR> <Center> <font   style= 'font-size:10.5pt '> 对不起,你已经投过票了! </font> "
end   if
elseif   action= " "   and   vtp= " "   then
path= "/news/ "
Set   rs   =   Server.CreateObject( "ADODB.RecordSet ")
rs.Open   "select   *   from   [config] ",conn,1,1
if   rs.recordcount <> 0   then
      path=rs( "path ")
end   if
rs.close
set   rs=nothing
id=trim(request( "id "))
if   id= " "   then   id=0
%>
document.write( " <head> <meta   http-equiv= 'Content-Language '   content= 'zh-cn '> <meta   http-equiv= 'Content-Type '   content= 'text/html;   charset=gb2312 '> </head> ");
document.write( " <table   border=0   cellpadding=0   cellspacing=0> <form   method= 'POST '   action= ' <%=path%> tpjs.asp?id= <%=id%> &action=tp '   Target=_blank> <tr> <td> ");
<%
Set   rs   =   Server.CreateObject( "ADODB.RecordSet ")
rs.Open   "select   *   from   [tp]   where   id= "&id,conn,1,1
if   rs.recordcount <> 0   then  
title=rs( "title ")
%>
document.write( " <%=title%> <br> ");
<%
for   i=1   to   15
if   rs( "tp "&i& " ")= " "   then   exit   for
  相关解决方案