| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 393 人关注过本帖
标题:怎么在读取数据库时老是空一行-----急
只看楼主 加入收藏
taijixing
Rank: 1
等 级:新手上路
威 望:1
帖 子:118
专家分:0
注 册:2007-6-9
收藏
 问题点数:0 回复次数:3 
怎么在读取数据库时老是空一行-----急

下面是代码
请大哥大姐们帮忙看看
先谢过了
<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<!--#include file="conn.asp"-->
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>无标题文档</title>
<style type="text/css">
<!--
body {
background-color: #cccccc;
margin-top:0;
}
.style1 {color: #FF0000}
.link {
color: #666666;
text-decoration: none;
}
-->
</style></head>

<body>
<table width="1003" border="0" align="center">
<tr>
<td><!--#include file="head.asp"--></td>
</tr>
</table>
<table width="1003" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td><object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="1003" height="174">
<param name="movie" value="image/top0.swf">
<param name="quality" value="high">
<embed src="image/top0.swf" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="1003" height="174"></embed>
</object></td>
</tr>
</table>

<table width="1003" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td width="200" height="400" rowspan="2"><object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="200" height="400">
<param name="movie" value="image/left.swf">
<param name="quality" value="high">
<embed src="image/left.swf" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="200" height="400"></embed>
</object></td>
<td height="50"><img src="image/top_xw.jpg" width="600" height="50"></td>
</tr>
<tr>
<td>&nbsp;&nbsp;&nbsp;&nbsp;
<table width="100%" border="0">
<%
set rs=server.createobject("adodb.recordset")
rs.open "select* From news order by id desc",conn,1,1
%>

<%
while not rs.eof
%>
<tr>
<td><a href=list.asp?id=<%=rs("id")%> class="link">
::
<%response.write trim(rs("title")) %>
::</a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="style1">&nbsp;[</span> <font color="#003300">
<%response.Write(rs("time"))%></font>
<span class="style1"> ]</span> </td>
</tr>
<%
rs.movenext
wend
%>
<%
rs.close
conn.close
set rs=nothing
set conn=nothing
%>
</table></td>
</tr>
</table>
<hr>
<hr>
<table width="1003" border="0" align="center">
<tr>
<td><!--#include file="foot.asp"--></td>
</tr>
</table>
</body>
</html>

搜索更多相关主题的帖子: 数据库 
2007-07-15 14:17
taijixing
Rank: 1
等 级:新手上路
威 望:1
帖 子:118
专家分:0
注 册:2007-6-9
收藏
得分:0 

下面是代码
请大哥大姐们帮忙看看
先谢过了
<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<!--#include file="conn.asp"-->
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>无标题文档</title>
<style type="text/css">
<!--
body {
background-color: #cccccc;
margin-top:0;
}
.style1 {color: #FF0000}
.link {
color: #666666;
text-decoration: none;
}
-->
</style></head>

<body>
<table width="1003" border="0" align="center">
<tr>
<td><!--#include file="head.asp"--></td>
</tr>
</table>
<table width="1003" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td><object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="1003" height="174">
<param name="movie" value="image/top0.swf">
<param name="quality" value="high">
<embed src="image/top0.swf" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="1003" height="174"></embed>
</object></td>
</tr>
</table>

<table width="1003" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td width="200" height="400" rowspan="2"><object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="200" height="400">
<param name="movie" value="image/left.swf">
<param name="quality" value="high">
<embed src="image/left.swf" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="200" height="400"></embed>
</object></td>
<td height="50"><img src="image/top_xw.jpg" width="600" height="50"></td>
</tr>
<tr>
<td>&nbsp;&nbsp;&nbsp;&nbsp;
<table width="100%" border="0">
<%
set rs=server.createobject("adodb.recordset")
rs.open "select* From news order by id desc",conn,1,1
%>

<%
while not rs.eof
%>
<tr>
<td><a href=list.asp?id=<%=rs("id")%> class="link">
::
<%response.write trim(rs("title")) %>
::</a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="style1">&nbsp;[</span> <font color="#003300">
<%response.Write(rs("time"))%></font>
<span class="style1"> ]</span> </td>
</tr>
<%
rs.movenext
wend
%>
<%
rs.close
conn.close
set rs=nothing
set conn=nothing
%>
</table></td>
</tr>
</table>
<hr>
<hr>
<table width="1003" border="0" align="center">
<tr>
<td><!--#include file="foot.asp"--></td>
</tr>
</table>
</body>
</html>

2007-07-15 14:19
gdk2006
Rank: 4
等 级:业余侠客
威 望:8
帖 子:928
专家分:270
注 册:2006-7-2
收藏
得分:0 
把你的SQL语句贴出来!!!

程序员的悲哀如何找女朋友?
追女解决方案百度“让她着迷”!
2007-07-16 12:27
rtc
Rank: 2
等 级:新手上路
威 望:4
帖 子:590
专家分:0
注 册:2007-6-6
收藏
得分:0 
把代码贴出来!
2007-07-16 13:20
快速回复:怎么在读取数据库时老是空一行-----急
数据加载中...
 
   



关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.013029 second(s), 7 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved