SOS:问题怪怪,菜鸟绕路.解决给分,祝君中奖!!!!!!!!!(ASP访问数据库的问题)

yxh8259 2003-02-19 02:58:33
<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 状态值。没有工作被完成。

?
...全文
50 5 打赏 收藏 转发到动态 举报
写回复
用AI写文章
5 条回复
切换为时间正序
请发表友善的回复…
发表回复
yxh8259 2003-02-19
  • 打赏
  • 举报
回复
逍遥小贼:唉,我能检查的都检查了.要是还有办法就不来求助了!
wyj1979 2003-02-19
  • 打赏
  • 举报
回复
rs2.Open tempSQL2,conn2
hubinasm 2003-02-19
  • 打赏
  • 举报
回复
怎么一个是CONN,一个是CONN2?
hubinasm 2003-02-19
  • 打赏
  • 举报
回复
怎么一个是
逍遥小贼 2003-02-19
  • 打赏
  • 举报
回复
还没解决?关注一下吧,
我觉得不是pws的问题,还是你程序上的问题,仔细检查类型匹配之类的细节问题,字符数据trim()用函数去掉多余的空格,

28,391

社区成员

发帖
与我相关
我的任务
社区描述
ASP即Active Server Pages,是Microsoft公司开发的服务器端脚本环境。
社区管理员
  • ASP
  • 无·法
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧