- ASP - Database Table Display
·Script Writers
·Database Display
·Response Objects
·Server Variables
·Random Events
·What's New?
Mail List


Count Query Observations
How many observations are in your db or recordset?  This simple code will display the number of observations in our db on Mark "The Bird" Fidrych.  Each observation in the db represents one year in Fidrych's brief, but memorable career.

View the Output
Text View
Print View
Mail this Link
Download the Code
View the Data

<title> db obs)</title>
<body bgcolor="#FFFFFF">
dim accessdb, cn, rs, sql
' Name of the Accessdb being read

' Connect to the db with a DSN-less connection
cn="DRIVER={Microsoft Access Driver (*.mdb)};"
cn=cn & "DBQ=" & server.mappath(accessdb)

' Create a server recordset object
Set rs = Server.CreateObject("ADODB.Recordset")

' Select all data from the table the_bird
sql = "select count(year) as counter from the_bird "

' Execute the sql
rs.Open sql, cn

' Write out the counter to the browser
response.write rs("counter") 

' Close and set the recordset to nothing
set rs=nothing





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 is hosted by
    Donate Food Online with a Mouse Click at
    Donate Land Online with a Mouse Click at
    © 1999 - 2018
    All Rights Reserved

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