CodeAve.com CodeAve.com - ASP - Database Table Display
ASP
·Read/Write
·Script Writers
·Database Display
·Response Objects
·Server Variables
·Random Events
·Articles
·Miscellaneous
·Contents
·What's New?
JavaScript
CSS
HTML
Maps
Links
Mail List
Search
Sitemap


 


Limiting Records Returned from a Query
When you're building applications that can potentially return many records, or take a long time to return a few you may want to add the following code during development.

Set rs = Server.CreateObject("ADODB.Recordset")
rs.maxrecords=15

This will return 15 records (less if there were not 15 matches made).
By limiting the data returned from a query you do run the risk of not knowing how resposive your application may or may not be, so it's best used in the early stages of application development
View the Output
Text View
Print View
Mail this Link
Download the Code
View the Data

<%
accessdb="simpsons" 
cn="DRIVER={Microsoft Access Driver (*.mdb)};"
cn=cn & "DBQ=" & server.mappath(accessdb)
Set rs = Server.CreateObject("ADODB.Recordset")
rs.maxrecords=15

sql = "select blackboard from simpsons" 

rs.Open sql, cn
%>

<%
On Error Resume Next
rs.MoveFirst
do while Not rs.eof
%>


<font face="arial" size="2">
<%= rs("blackboard") %>
</font>
<br>

<%
rs.MoveNext
loop%>

 

 

 



ASP: What's New? | Articles | Script Writers | Database Display | Read/Write
Server Variables | Response Objects | Random Events | Miscellaneous
HTML: Forms | Hyperlinks | Headers | Tables | Hyperlinks | Headers | Text Display
JavaScript: Document Info | Forms | Images | Navigation | Script Writers
CSS: Basics | Page Display | Text Display | Script Writers | Miscellaneous
  • 2014 michael kors
  • air max women 2013
  • 2014 michael kors
  • air max 2014
  • oakley glasses
  • oakley glasses

  • Maps: Map Script Writers | Bing Maps | Google Maps
  • bottes fr
  • ugg boot
  • Privacy Statement

    CodeAve.com is hosted by MyHosting.com
    Donate Food Online with a Mouse Click at TheHungerSite.com
    Donate Land Online with a Mouse Click at TheRainForestSite.com
    © 1999 - 2017 CodeAve.com
    All Rights Reserved

  • Kids jordan 6 rings
  • Jordan retro 10
  • Jordan retro 3