|
-
Oct 3rd, 2000, 10:55 AM
#1
Thread Starter
Addicted Member
How do I output the number of records in a database? I've tried recordset.count and the .count but always get an error
-
Oct 3rd, 2000, 10:59 AM
#2
Fanatic Member
you may have to do a recordset.movelast and then a .movefirst before you can actually get the actual recordcount.
failing that try this SQL:
Select count(*) FROM tablename AS NumOfRecords.
Once executed open this recordset, movefirst, then
grab the value of recordset.fields("NumOfRecords")
see what that gives you...
Crispin
VB6 ENT SP5
VB.NET
W2K ADV SVR SP3
WWW.BLOCKSOFT.CO.UK
[Microsoft Basic: 1976-2001, RIP]
-
Oct 3rd, 2000, 11:06 AM
#3
Thread Starter
Addicted Member
forgot to mention
forgot to mention, I am using SQL
-
Oct 3rd, 2000, 11:16 AM
#4
Fanatic Member
I think you should be ok with the SQL above...
Crispin
VB6 ENT SP5
VB.NET
W2K ADV SVR SP3
WWW.BLOCKSOFT.CO.UK
[Microsoft Basic: 1976-2001, RIP]
-
Oct 3rd, 2000, 12:30 PM
#5
Thread Starter
Addicted Member
Thanks
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|