SQL语句有错,进来指点一下,马上送分!!!!!
ASP+Sybase数据库 字段 Filghtdt 是datetime 属性
Sql_xls= "select * from WareList where 1=1 "
Sql_xls = sql_xls & " and dateValue(Filghtdt)= "&date()& " "
Set rs = Server.CreateObject( "ADODB.Recordset ")
response.write Sql_xls
rs.Open Sql_xls,conn_ZD,3,2,1
不加第二行就没有错,加了就报如下错误,
select * from WareList where 1=1 and dateValue(Filghtdt)=2007-9-1
Microsoft OLE DB Provider for ODBC Drivers 错误 '80040e21 '
ODBC 驱动程序不支持所需的属性。
/tfadmin/zdgwdata.asp,行177
[解决办法]
select * from WareList where 1=1 and dateValue(Filghtdt)= "2007-9-1 "
[解决办法]
单引号试试
[解决办法]
select * from tmsWareHouseList where 1=1 and FlightDt <= '2007-9-3 23:59:59 ' and FlightDt> = '2007-9-3 00:00:00 '
这样总行了吧 :)
或者用convert函数代替dateValue转换一下格式。