Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP General > URGENT(COUNTING OF RECORD IN DATAABSE USING ASP)

Reply
Thread Tools

URGENT(COUNTING OF RECORD IN DATAABSE USING ASP)

 
 
Daniel Ng
Guest
Posts: n/a
 
      10-01-2004


Hi all, may i know how to write a simple code using asp to count the
number of record in the Access and display the figure out... Thanks...

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
 
Reply With Quote
 
 
 
 
Ray Costanzo [MVP]
Guest
Posts: n/a
 
      10-01-2004
<%
Dim oADO, oRS, sSQL
sSQL = "SELECT COUNT(UniqueID) FROM tableName"
Set oADO = CreateObject("ADODB.Connection")
oADO.Open "your connection string, www.connectionstrings.com"
Set oRS = oADO.Execute(sSQL)
Response.Write "Record count is " & oRS.Fields.Item(0).Value
oRS.Close : Set oRS = Nothing
oADO.Close : Set oADO = Nothing
%>

Some will say to do a COUNT(*). I personally count a column that I know
will never have any nulls, such as whatever is the primary key in the table.

Ray at work

"Daniel Ng" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
>
>
> Hi all, may i know how to write a simple code using asp to count the
> number of record in the Access and display the figure out... Thanks...
>
> *** Sent via Developersdex http://www.developersdex.com ***
> Don't just participate in USENET...get rewarded for it!



 
Reply With Quote
 
 
 
 
Tom Kaminski [MVP]
Guest
Posts: n/a
 
      10-01-2004
"Daniel Ng" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
>
>
> Hi all, may i know how to write a simple code using asp to count the
> number of record in the Access and display the figure out... Thanks...


http://www.aspfaq.com/show.asp?id=2193

--
Tom Kaminski IIS MVP
http://www.microsoft.com/windowsserv...y/centers/iis/
http://mvp.support.microsoft.com/
http://www.iisfaq.com/
http://www.iistoolshed.com/ - tools, scripts, and utilities for running IIS
http://www.tryiis.com


 
Reply With Quote
 
Aaron [SQL Server MVP]
Guest
Posts: n/a
 
      10-01-2004
Why are all of your questions URGENT AND IN ALL CAPS???

--
http://www.aspfaq.com/
(Reverse address to reply.)




"Daniel Ng" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
>
>
> Hi all, may i know how to write a simple code using asp to count the
> number of record in the Access and display the figure out... Thanks...
>
> *** Sent via Developersdex http://www.developersdex.com ***
> Don't just participate in USENET...get rewarded for it!



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Updating a Record using a current record MRW ASP .Net 0 02-11-2008 06:58 PM
Adding new record using previous record information... help!! Maximus ASP General 2 04-12-2007 09:55 PM
Retrieving Record Key while creating the record. =?Utf-8?B?SnVzdGlu?= ASP .Net 4 10-05-2004 08:11 PM
insert record using stored proc returns no error but doesn't inserd record ASP General 1 01-09-2004 04:53 PM
using dropdown box to display db record & update record Jimmy Tran ASP General 1 10-03-2003 04:20 PM



Advertisments