日期:2014-05-17  浏览次数:20798 次

帮忙看看问题出哪了阿?
Microsoft OLE DB Provider for ODBC Drivers 错误 '80040e21' 

ODBC 驱动程序不支持所需的属性。 

/search.asp,行 549 
 
 
 
 dim connstr2
  connstr2="DBQ="+server.mappath("../database/mydb.mdb")+";DefaultDir=;DRIVER={Microsoft Access Driver (*.mdb)};"
  set conn=server.createobject("ADODB.CONNECTION")
  conn.open connstr2

set rs=server.CreateObject("adodb.recordset")

  dim bigclass,smallclass,sheng,shi,name
  bigclass=trim(request("anclassid"))  
smallclass=trim(request("nclassid"))  
sheng=trim(request("dsheng"))  
shi=trim(request("dshi"))  
jiage=trim(request("jiage"))
name=trim(request("searchkey")) 
name=replace(name,"'","''") 

Sql= " Select * from shop_books where 1=1 " 
   
if bigclass<>0 then 

select case action
case "1"
 
  if bigclass <>"" then 
sql= sql & " and anclassid= '"&bigclass&"'"
end if
if smallclass <>"" then
sql= sql & " and nclassid= '"&smallclass&"'"
end if
if sheng <>"" then 
sql= sql & " and dsheng= '"&sheng&"'" 
end if 
if shi <>"" then 
sql= sql &" and dshi= '"&shi&"'" 
end if 
if name <>"" then
sql= sql &" and bookname like '%"&name&"%' and huiyuanjia<"&jiage&" " 
end if 
   

case "2"

  if bigclass <>"" then 
sql= sql & " and anclassid= '"& bigclass &"'"
end if
if smallclass <>"" then
sql= sql & " and nclassid= '"& smallclass &"'"
end if
if sheng <>"" then 
sql= sql & " and dsheng= '"& sheng &"'" 
end if 
if shi <>"" then 
sql= sql&" and dshi= '"& shi &"'" 
end if 
if name <>"" then
sql= sql&" and pingpai like '%"& selectname &"%' and huiyuanjia<"&jiage&" " 
end if 
   
 
case "3"

  if bigclass <>"" then 
sql= sql & " and anclassid= '"& bigclass &"'"
end if
if smallclass <>"" then
sql= sql & " and nclassid= '"& smallclass &"'"
end if
if sheng <>"" then 
sql= sql & " and dsheng= '"& sheng &"'" 
end if 
if shi <>"" then 
sql= sql&" and dshi= '"& shi &"'" 
end if 
if name <>"" then
sql= sql&" and bookzz like '%"& selectname &"%' and huiyuanjia<"&jiage&" " 
end if 
   
 
case "4"
 
  if bigclass <>"" then 
sql= sql & " and anclassid= '"& bigclass &"'"
end if
if smallclass <&g