日期:2014-05-17  浏览次数:20824 次

为什么会这样???
<%
'以下将判断关键字,为空等则不执行查询
if   request( "t1 ")= " "   then
response.Write "请输入证书编号! <meta   http-equiv=refresh   content= '1;url=chaxun.asp '> "
response.end
end   if    
t1=trim(request.form( "t1 "))////第31行
sql= "select     *     from   zhengshu     where     bianhao= "&t1& "   "
set   rs=conn.execute   (sql)
if   rs.eof   then                                                                                                                 response.Write "没有该记录,请确认输入是否正确! <meta   http-equiv=refresh   content= '1;url=chaxun.asp '> "
response.end
end   if
%>
然后系统就说有错误,错误提示是:
Microsoft   VBScript   运行时错误   错误   '800a01f4 '  

变量未定义:   't1 '  

/html/result.asp??А   31  

t1就是查询页面里输入编号的区域.

是怎么回事啊   ???


------解决方案--------------------
Dim t1
t1=trim(request.form( "t1 "))
------解决方案--------------------
sql= "select * from zhengshu where bianhao= ' "&t1& " ' "