注册 登录
编程论坛 ASP.NET技术论坛

初学者求助,高手来帮看看

mithli 发布于 2008-01-24 11:02, 778 次点击
<%@ 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>

数据总是显示不出来,望高手指点
2 回复
#2
mithli2008-01-24 11:13
问题已解决
#3
zsf20062008-01-25 16:28
哪儿出了问题啊 ???
1