| 发表于:2008-01-23 18:23:3310楼 得分:0 |
5#就好了 ---------------------- <%dim riqi riqi= 'date() ' %> date()是函数返回当天日期,赋值:riqi=date() '是注释,你那样写什么都不是只会报错 ---------------------- select * from 表 where 日期=riqi 你的语句中riqi是表示列名,需要这样写:select * from 表 where 日期= '2008-1-23 ' 在asp中给执行的语句sql赋值,riqi是变量,这样写:sql= "select * from 表 where 日期= ' "& riqi & " ' " --------------------- 程序调试中不对的地方往往有错误提示的,不要提问就说不行,贴出代码,和错误提示,更容易帮你解决问题. | | |
|