dscccc 2016-05-09 15:01 采纳率: 0%
浏览 1283
已结题

asp中,数据库查询无法显示

 <%@ LANGUAGE="VBSCRIPT" %>
<!--#include file="conn.asp"-->
<%
Id=Session("LoginSuccess")
set rs = Server.CreateObject("ADODB.recordset")
sql="select * from RegUser where UserId='"&Id&"'"
rs.open sql,conn,1,1
%>

<html >
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>农行“四融”平台</title>

<link href="style.css" rel="stylesheet" type="text/css">
<style type="text/css">
<!--
body {
    background-color:#ebfbf8;
}
-->
</style></head>



<body>
<div align="center">
  <center>
    <table cellspacing="1" cellpadding="4" width="429" bgcolor="#5A8BCE" height="144"><!--DWLayoutTable-->
      <tbody>
        <tr valign="top" bgcolor="#8CAAE7">
          <td class="main1" colspan="2" width="415" height="10"></td>
        </tr>
        <tr valign="top" bgcolor="#E6F7FF">
          <td width="415" height="32" colspan="2" bgcolor="#BCBCDE" class="main1">用户详细资料</td>
        </tr>
        <tr bgcolor="#E6F7FF">
          <td width="102" height="25" align="right" bgcolor="#BCBCDE" class="main1">用户帐号:</td>
          <td width="301" height="25" bgcolor="#BCBCDE" class="main1"><%=rs("UserId")%></td>
        </tr>
        <tr bgcolor="#E6F7FF">
          <td width="102" height="25" align="right" bgcolor="#BCBCDE" class="main1">银行卡号:</td>
          <td width="301" height="25" bgcolor="#BCBCDE" class="main1"><%=rs("Card")%></td>
        </tr>
        <tr bgcolor="#E6F7FF">
          <td width="102" height="25" align="right" bgcolor="#BCBCDE" class="main1">身份证号:</td>
          <td width="301" height="25" bgcolor="#BCBCDE" class="main1"><%=rs("sfz")%></td>
        </tr>
        <tr bgcolor="#E6F7FF">
          <td width="102" height="25" align="right" bgcolor="#BCBCDE" class="main1">真实姓名:</td>
          <td  width="301" height="25" bgcolor="#BCBCDE"><%=rs("Name")%></td>
        </tr>

        <tr bgcolor="#E6F7FF">
          <td width="102" height="25" align="right" bgcolor="#BCBCDE" class="main1">联系电话:</td>
          <td width="301" height="25" bgcolor="#BCBCDE" class="main1"><%=rs("Phone")%></td>
        </tr>
        <tr bgcolor="#E6F7FF">
          <td width="102" height="25" align="right" bgcolor="#BCBCDE" class="main1">地址:</td>
          <td width="301" height="25" bgcolor="#BCBCDE" class="main1"><%=rs("Address")%></td>
        </tr>
        <tr bgcolor="#E6F7FF">
          <td width="102" height="25" align="right" bgcolor="#BCBCDE" class="main1">邮政编码:</td>
          <td width="301" height="25" bgcolor="#BCBCDE" class="main1"><%=rs("Zip")%></td>
        </tr>
        <tr bgcolor="#E6F7FF">
          <td width="102" height="25" align="right" bgcolor="#BCBCDE" class="main1">注册时间:</td>
          <td width="301" height="25" bgcolor="#BCBCDE" class="main1"><%=rs("RegTime")%></td>
        </tr>
        <tr valign="top" bgcolor="#E6F7FF">
          <td width="415" height="15" colspan="2" bgcolor="#BCBCDE" class="main1"></td>
        </tr>
        <tr bgcolor="#E6F7FF">
          <td width="415" height="27" colspan="2" bgcolor="#BCBCDE" class="main1"><p align="center">
            <input name="B4" type="button" class="smallInput" onClick="javascript:window.history.go(-1)" value="  返回  " />
            </p>

<p align="right">&nbsp;</p>
</a></td>
        </tr>
        <tr bgcolor="#8CAAE7">

        </tr>
      </tbody>
    </table>
  </center>
</div>
</body>
</html>

  • 写回答

2条回答

  • threenewbee 2016-05-09 15:02
    关注

    conn在哪里定义的,你的连接字符串呢?

    评论

报告相同问题?

悬赏问题

  • ¥15 #MATLAB仿真#车辆换道路径规划
  • ¥15 java 操作 elasticsearch 8.1 实现 索引的重建
  • ¥15 数据可视化Python
  • ¥15 要给毕业设计添加扫码登录的功能!!有偿
  • ¥15 kafka 分区副本增加会导致消息丢失或者不可用吗?
  • ¥15 微信公众号自制会员卡没有收款渠道啊
  • ¥100 Jenkins自动化部署—悬赏100元
  • ¥15 关于#python#的问题:求帮写python代码
  • ¥20 MATLAB画图图形出现上下震荡的线条
  • ¥15 关于#windows#的问题:怎么用WIN 11系统的电脑 克隆WIN NT3.51-4.0系统的硬盘