错误 '80040e14' 请高手指引,在线等
大家好,请教大家一个问题
<%
dim newstp,skey,dt
newstp = getValue( "newstp ")
skey = getValue( "skey ")
dt = getValue( "dt ")
sqlStr = "Select convert(varchar(10),UID)UID,DTITLE,convert(varchar(10),DATE,102)DATE,NEWSTP,linkmode,destpage From NEWS_INFO Where 1=1 and FLAG= '1 ' and datediff(month,DATE,getdate()) <=3 "
If newstp <> " " Then sqlStr = sqlStr & " And NEWSTP = ' " & newstp & " ' "
If skey <> " " Then sqlStr = sqlStr & " And (SKEY Like '% " & skey & "% ' or DTITLE Like '% " & skey & "% ') "
If dt <> "0 " Then sqlStr = sqlStr & " And DATEDIFF(day,DATE,getdate()) <= " & dt
sqlStr = sqlStr & "order by DATE desc "
' response.write(sqlstr)
Set rs = Server.CreateObject( "ADODB.Recordset ")
rs.CursorLocation = 3
'16行报错误处
rs.open sqlStr,Application( "connStrInfo "),0,1
rs.PageSize = 20
pageNo = Trim(Request( "pageNo "))
if Not IsNumeric(pageNo) then pageNo = "1 "
pageNo = CInt(pageNo)
If pageNo < 1 Then pageNo = 1
If pageNo > rs.PageCount Then pageNo = rs.PageCount
If rs.PageCount = 0 Then pageNo = 0
%>
Microsoft OLE DB Provider for ODBC Drivers 错误 '80040e14 '
[Microsoft][ODBC SQL Server Driver][SQL Server]在关键字 'order ' 附近有语法错误。
/info/NewsSearchResult.asp,行 16
------解决方案-------------------- "order by DATE desc " 改成: " order by DATE desc " 在order前加个空格