ASP specifies to read the first few records

Source: Internet
Author: User

<%dim Sqlnote2
Sqlnote2= "SELECT Top 8 * note1 ORDER BY id DESC"
Call OPENDB ()
Rs.Open sqlnote2,conn,1,1
If not rs.eof then
Do as not rs.eof

%>
<tr>
&LT;TD width= "5" height= "align=" "left" bgcolor= "#FFFFFF" >&nbsp;</td>
&LT;TD width= "169" height= "align=" "left" bgcolor= "#FFFFFF" >&nbsp;<a href= "<%=rs (" File_path ")%>" target= "_blank" class= "prodcut" title= "<%=rs (" Title ")%>" ><%=rs ("title")%></a>&nbsp;&nbsp;
<% if RS ("Send_date") =date () Then
Response.Write ("Else Response.Write (RS ("Send_date"))
End If%></td>
&LT;TD width= "1" height= "5" align= "left" bgcolor= "#FFFFFF" >&nbsp;</td>
</tr>
<%
Rs.movenext
Loop%>
<tr >
&LT;TD colspan= "3" align= "right" bgcolor= "#FFFFFF" ><a href= "note.asp Tutorial" class= "page" > More information ...</a> &nbsp;&nbsp;&nbsp;</td>
</tr>
<%
Else
%>
<tr class= "Button3" >
&LT;TD colspan= "3" bgcolor= "#FFFFFF" > No notification Notice </td>
</tr>
<%
End If
Call Closedb ()
%>

Original reprint of this site annotated www.111cn.net/asp/asper.html

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.