超星阅读器5.0安卓版:ODBC 驱动程序不支持所需的属性。

来源:百度文库 编辑:查人人中国名人网 时间:2024/04/29 01:24:57
Microsoft OLE DB Provider for ODBC Drivers 错误 '80040e21'

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

/jyjy.asp,行69

代码如下
<%
dim

rs_user,rs_today,rs_lar,rs_newboy,rs_newgirl,rs_board,rs_links,rs_boy,rs_girl,rs_online,rs_hs,rs,rsQuestion,rsAnswer,star_gir

l,star_boy,rs_article
dim

sql,records,today_records,today_pics,rs_pic,rs_photoboy,rs_photogirl,rs_bb,rs_birthday,rs_count,online_count,articlecount,rs_

vote,vote_count
dim i,j,k,pics,birnum
dim conn,connpic,articleconn,myDBPath

if isempty(session("u_id")) or session("u_id")="" then
session("u_id")=1
end if

Set conn = Server.CreateObject("ADODB.connection")
myDBPath = Server.MapPath("data/jdahgjkodnaskl.asp")
conn.Open "driver={Microsoft Access Driver (*.mdb)};dbq=" & myDBPath

Set connpic = Server.CreateObject("ADODB.Connection")
DBPath = Server.MapPath("mdb/Jimg.asp")
connpic.Open "driver={Microsoft Access Driver (*.mdb)};dbq=" & myDBPath

Dim us_id
us_id=session("u_id")
%>
<table width="100%" border="0" cellpadding="5" cellspacing="1">
<tbody>
<tr>
<td align="center" valign="top" width="25%" background="images/bg2.gif">
<%
'取得人气最高的女主角
Set rs_girl = Server.CreateObject("ADODB.Recordset")
sql="select top 1 user_id,netname,age,home from larchives where sex like '" & "女" & "' and photo > 0 order by renqi desc"
rs_girl.open sql,conn,1,1
if rs_girl.eof and rs_girl.bof then%>
<p>没有,暂时空缺!
<%else
Set rs_pic = Server.CreateObject("ADODB.Recordset")
sql="select id from pic where user_id=" & rs_girl("user_id") & " and index = true"
rs_pic.open sql,connpic,1,1
if rs_pic.eof and rs_pic.bof then
pics=1
else
pics=rs_pic("id")
end if
%>

你这一句:

sql="select top 1 user_id,netname,age,home from larchives where sex like '" & "女" & "' and photo > 0 order by renqi desc"

在数据库中sex字段是只有男,女么?那样的话直接这样写where sex = '女' 就可以了。

如果这个sex是含有女的话,可以这样写:

where sex like '%%女%%'