标题:[求助]查询结果显示的问题
只看楼主
ASP汽车
Rank: 1
等 级:新手上路
帖 子:197
专家分:0
注 册:2007-7-4
得分:0 
Microsoft VBScript 编译器错误 (0x800A0408)
无效字符
/lj/dispose_demand.asp, line 41, column 3
sql=sql&"select * from REQUIRE_BILL where CONVERT(int,MONTH(date))>=time and CONVERT(int,MONTH(date))<=time1"
--^


出错了

学习ASP中.....难啊......
2007-07-10 12:59
放任一切
Rank: 2
等 级:新手上路
威 望:4
帖 子:217
专家分:0
注 册:2007-3-22
得分:0 
不能这样写,time和time1是变量不能直接写进去
2007-07-10 13:33
ASP汽车
Rank: 1
等 级:新手上路
帖 子:197
专家分:0
注 册:2007-7-4
得分:0 

晕那怎么写,我下面就是按照你教我的写的哦,难道我又理解错误啦,,写段我看看嘛多谢哈
if APPLY_TIME <>"" then
time=cint(APPLY_TIME)
else
time=0
end if
if APPLY_TIME_end <>"" then
time1=cint(APPLY_TIME_end)
else
time1=0
end if
if time<>0 and time1<>0 then
sql=sql&"select * from REQUIRE_BILL where CONVERT(int,MONTH(date))>=time and CONVERT(int,MONTH(date))<=time1"
end if

if time<>0 and time1=0 then
sql=sql&"select * from REQUIRE_BILL where CONVERT(int,MONTH(date))>=time"
end if
if time=0 and time1<>0 then
sql=sql&"select * from REQUIRE_BILL where CONVERT(int,MONTH(date))<=time1"
end if


学习ASP中.....难啊......
2007-07-10 13:41
放任一切
Rank: 2
等 级:新手上路
威 望:4
帖 子:217
专家分:0
注 册:2007-3-22
得分:0 
我上面只是写的SQL语句
time是变量
sql=sql&"select * from REQUIRE_BILL where CONVERT(int,MONTH(date))>="&cstr(time)&" and CONVERT(int,MONTH(date))<="&cstr(time)
2007-07-10 13:44
ASP汽车
Rank: 1
等 级:新手上路
帖 子:197
专家分:0
注 册:2007-7-4
得分:0 
if APPLY_TIME <>"" then
time=cint(APPLY_TIME)
else
time=0
end if
if APPLY_TIME_end <>"" then
time1=cint(APPLY_TIME_end)
else
time1=0
end if
if time<>0 and time1<>0 then
sql=sql&"select * from REQUIRE_BILL where CONVERT(int,MONTH(date))>="&cstr(time)&" and CONVERT(int,MONTH(date))<="&cstr(time)&""
end if

Microsoft VBScript 编译器错误 (0x800A0408)
无效字符
/lj/dispose_demand.asp, line 42, column 3
sql=sql&"select * from REQUIRE_BILL where CONVERT(int,MONTH(date))>="&cstr(time)&" and CONVERT(int,MONTH(date))<="&cstr(time)&""


还是不对

学习ASP中.....难啊......
2007-07-10 13:53
放任一切
Rank: 2
等 级:新手上路
威 望:4
帖 子:217
专家分:0
注 册:2007-3-22
得分:0 
sql=
sql=
2007-07-10 13:54
放任一切
Rank: 2
等 级:新手上路
威 望:4
帖 子:217
专家分:0
注 册:2007-3-22
得分:0 

是这里的原因吧,你看看那个等号是什么输入法的?

2007-07-10 13:55
ASP汽车
Rank: 1
等 级:新手上路
帖 子:197
专家分:0
注 册:2007-7-4
得分:0 
放任一切,你真的很厉害

学习ASP中.....难啊......
2007-07-10 13:57
ASP汽车
Rank: 1
等 级:新手上路
帖 子:197
专家分:0
注 册:2007-7-4
得分:0 
万分感谢~~~~~~~~~

学习ASP中.....难啊......
2007-07-10 13:58
放任一切
Rank: 2
等 级:新手上路
威 望:4
帖 子:217
专家分:0
注 册:2007-3-22
得分:0 

呵呵,共同学习!

[此贴子已经被作者于2007-7-10 14:01:31编辑过]

2007-07-10 14:01



参与讨论请移步原网站贴子:https://bbs.bccn.net/thread-154264-1-1.html




关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 1.589803 second(s), 7 queries.
Copyright©2004-2025, BCCN.NET, All Rights Reserved