初学者求助,高手来帮看看
<%@ Control Language="VB" AutoEventWireup="false" CodeFile="hot_citys.ascx.vb" Inherits="hot_citys" %><%@ Register TagPrefix="mobile" Namespace="System.Web.UI.MobileControls" Assembly="System.Web.Mobile" %>
<%@ Import namespace="system.data" %>
<%@ Import namespace="system.data.sqlclient" %>
<table width="80%" height="25" border="0" cellpadding="0" cellspacing="0">
<%
Dim checkname As New check
Dim conn As Data.SqlClient.SqlConnection
conn = New System.Data.SqlClient.SqlConnection
conn.ConnectionString = checkname.sjkconn1()
conn.Open()
Dim sql As Data.SqlClient.SqlCommand
Dim rs As System.Data.SqlClient.SqlDataReader = sql.ExecuteReader
sql = New System.Data.SqlClient.SqlCommand
= "select * from [news] with (nolock) order by time desc"
sql.Connection = conn
Do While rs.Read
%>
<tr>
<td align="left" valign="middle">热门城市:<a href="#" class="b1">
此处显示NEWS数据库中字段为BIAOTI的数据</a></td>
</tr>
<%
Loop
conn.Close()
conn = Nothing
%>
</table>
数据总是显示不出来,望高手指点