SOS:问题怪怪,菜鸟绕路.解决给分,祝君中奖!!!!!!!!!(ASP访问数据库的问题)
<body>
<%wyhh=request.form("yhh")%>
<%
Set conn=Server.CreateObject ("ADODB.Connection")
connStr="DSN=zyydgl;Database=zyydgl;UID=;PWD=;"
conn.Open connStr
Set rs=Server.CreateObject ("ADODB.RecordSet")
rs.CursorType = adOpenStatic
tempSQL="select yhh,yhm,yddz,yyhh from df_yhjbxx where yhh='"&wyhh&"'"
rs.Open tempSQL,conn
%>
<p align="center">记录</p>
<table border="1" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="100%" id="AutoNumber1">
<tr>
<td width="25%"><font color="#FF0000">帐号:<%=rs("yhh")%></font></td>
<td width="46%">户名:<%=rs("yhm")%></td>
<td width="29%">卡号:<%=rs("yyhh")%></td>
</tr>
<tr>
<td width="100%" colspan="3">地址:<%=rs("yddz")%></td>
</tr>
<tr>
<td width="100%" colspan="3">表号:</td>
</tr>
</table>
<hr color="#0000FF">
<%
rs.close
wnian=request.form("nian")
wyue=request.form("yue")
%>
<%
Set rs2=Server.CreateObject ("ADODB.RecordSet")
rs2.CursorType = adOpenStatic
tempSQL2="select yhh,cbrq,zdl,zdf from df_zdf_ls where yhh='"&wyhh&"' order by cbrq desc"
rs2.Open tempSQL2,conn2
%>
<table border="1" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="100%" id="AutoNumber2">
<tr>
<td width="8%" align="center">月份</td>
<td width="8%" align="center">计费</td>
<td width="8%" align="center">应交</td>
<td width="8%" align="center">实交</td>
<td width="8%" align="center">未交</td>
<td width="8%" align="center">收费日期</td>
</tr>
<%
WHILE NOT rs2.EOF
%>
<tr>
<td width="8%" align="center"><%=rs2("cbrq")%> </td>
<td width="8%" align="center"><%=rs2("zdl")%> </td>
<td width="8%" align="center"><%=rs2("zdf")%> 元 </td>
<td width="8%" align="center"> </td>
<td width="8%" align="center"> </td>
<td width="8%" align="center"> </td>
</tr>
<%
rs2.MoveNext
WEND
rs2.close
set conn=nothing
%>
</table>
</body>
运行时记录不能全部显示,有的可显示一条,有的可显示几条,有的一条也显示不了
(数据库用的是Sybase11.9.2.用PB运行SQL语句没问题,我怀疑是PWS的问题,由于客观原因我的机器不能装WIN2000。没用IIS试过),出现错误提示如下:
Microsoft OLE DB Provider for ODBC Drivers 错误 '80020009'
多步 OLE DB 操作产生错误。请检查每个 OLE DB 状态值。没有工作被完成。
?