| | |
|
Active Server Pages ASP programs help tutorial tutorials routine routines jobs listserve mailinglist bulletin board bulletin boards programming snippet snippets CJWSoft ASPProtect ASPBanner ASPClassifieds
(Advanced)
(Components)
(Database)
(General)
(Vbscript)

|
|
Subject: |
Re: RecordCount Problems |
From: |
Harlan |
Date: |
2/17/1999 8:39:57 AM |
IP: |
206.222.20.2 |
How about Ill tell you why its happening, and explain it, but I wont give you the code at all :) You using a forward only cursor (default cursor type), when you request .recordcount the cursor actually moves down the list of records (within the database, so its lots faster then a loop in script to do the same thing), and counts them, fills in the recordcount variable and moves back to the first record for you. Your cursor cant move anywhere but one way.. down, so it cant move down once, and then back up, to count the records. Just change your cursor type. Now thats the bit of code Im not going to paste ;)
But I will tell you the types of cursors
0 - forward only
1 - keyset
2 - dynamic
3 - static
note: you asked about the ado constants file, setting cursors is one good use for that file, instead of seeing a 2 for dynamic cursor you can use adOpenDynamic. |
Previous Message
Follow Up - Re: RecordCount Problems - Pete 2/17/1999 9:42:03 AM
|
|

|
|
|
|