首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 网站开发 > ASP >

为什么会这样?该怎么解决

2012-03-12 
为什么会这样???%以下将判断关键字,为空等则不执行查询ifrequest( t1 ) thenresponse.Write 请输

为什么会这样???
<%
'以下将判断关键字,为空等则不执行查询
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& " ' "

热点排行