| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 391 人关注过本帖
标题:[求助]代码错误!~~
取消只看楼主 加入收藏
huzi01245
Rank: 1
等 级:新手上路
帖 子:8
专家分:0
注 册:2007-3-24
收藏
 问题点数:0 回复次数:1 
[求助]代码错误!~~


tdate,st,et是从上页取出的值
test是数据库
我觉得逻辑没有错误,但是运行就提示缺少then

if et>20:30 then
if st>20:30 then
set rs1=Con.Execute("insert into test values ('"& tdate &"','"& st &"','"& et &"')")
end if
if st>=18:30 and st<20:30 then
set rs2=Con.Execute("insert into test values ('"& tdate &"','"& st &"','20:30')")
set rs3=Con.Execute("insert into test values ('"& tdate &"','20:30','"& et &"')")
end if
if st>13:30 and st<18:30 then
set rs4=Con.Execute("insert into test values ('"& tdate &"','"& st &"','18:30')")
set rs2=Con.Execute("insert into test values ('"& tdate &"','18:30','20:30')")
set rs3=Con.Execute("insert into test values ('"& tdate &"','20:30','"& et &"')")
end if
if st>08:00 and st<13:30 then
set rs5=Con.Execute("insert into test values ('"& tdate &"','"& st &"','12:00')")
set rs4=Con.Execute("insert into test values ('"& tdate &"','13:30','18:30')")
set rs2=Con.Execute("insert into test values ('"& tdate &"','18:30','20:30')")
set rs3=Con.Execute("insert into test values ('"& tdate &"','20:30','"& et &"')")
end if
if st<08:00 then
set rs6=Con.Execute("insert into test values ('"& tdate &"','"& st &"','08:00')")
set rs5=Con.Execute("insert into test values ('"& tdate &"','08:00','12:00')")
set rs4=Con.Execute("insert into test values ('"& tdate &"','13:30','18:30')")
set rs2=Con.Execute("insert into test values ('"& tdate &"','18:30','20:30')")
set rs3=Con.Execute("insert into test values ('"& tdate &"','20:30','"& et &"')")
end if
end if
if et<=20:30 and et>18:30
if st>=18:30 then
set rs1=Con.Execute("insert into test values ('"& tdate &"','"& st &"','"& et &"')")
end if
if st>13:30 and st<18:30 then
set rs7=Con.Execute("insert into test values ('"& tdate &"','"& st &"','18:30')")
set rs8=Con.Execute("insert into test values ('"& tdate &"','18:30','"& et &"')")
end if
if st>08:00 and st<13:30 then
set rs5=Con.Execute("insert into test values ('"& tdate &"','"& st &"','12:00')")
set rs4=Con.Execute("insert into test values ('"& tdate &"','13:30','18:30')")
set rs8=Con.Execute("insert into test values ('"& tdate &"','18:30','"& et &"')")
end if
if st<08:00 then
set rs6=Con.Execute("insert into test values ('"& tdate &"','"& st &"','08:00')")
set rs5=Con.Execute("insert into test values ('"& tdate &"','08:00','12:00')")
set rs4=Con.Execute("insert into test values ('"& tdate &"','13:30','18:30')")
set rs8=Con.Execute("insert into test values ('"& tdate &"','18:30','"& et &"')")
end if
end if
if et<=17:30 and et>12:00 then
if st>=13:30 then
set rs1=Con.Execute("insert into test values ('"& tdate &"','"& st &"','"& et &"')")
end if
if st>08:00 and st<13:30 then
set rs5=Con.Execute("insert into test values ('"& tdate &"','"& st &"','12:00')")
set rs9=Con.Execute("insert into test values ('"& tdate &"','13:30','"& et &"')")
end if
if st<08:00 then
set rs6=Con.Execute("insert into test values ('"& tdate &"','"& st &"','08:00')")
set rs5=Con.Execute("insert into test values ('"& tdate &"','08:00','12:00')")
set rs9=Con.Execute("insert into test values ('"& tdate &"','13:30','"& et &"')")
end if
end if
if et<=12:00 and et>08:00 then
if st>=08:00 then
set rs1=Con.Execute("insert into test values ('"& tdate &"','"& st &"','"& et &"')")
end if
if st<08:00 then
set rs6=Con.Execute("insert into test values ('"& tdate &"','"& st &"','08:00')")
set rs10=Con.Execute("insert into test values ('"& tdate &"','08:00','"& et &"')")
end if
end if
if et<=08:00 then
set rs1=Con.Execute("insert into test values ('"& tdate &"','"& st &"','"& et &"')")
end if

搜索更多相关主题的帖子: 代码 
2007-05-30 09:29
huzi01245
Rank: 1
等 级:新手上路
帖 子:8
专家分:0
注 册:2007-3-24
收藏
得分:0 

还是不可以

提示我第一行缺少THEN

2007-05-30 09:43
快速回复:[求助]代码错误!~~
数据加载中...
 
   



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

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