borderAndreaVB free resources for Visual Basic developersborder

borderAndreaVB Visual Basic and VB.NET source code resources - Copyright © 1999-2007 Andrea Tincaniborder

AndreaVB | Forum | News | Downloads | Register | Help | Member List | Statistics | Search | PM | Profile

Print This Topic
Previous Topic (Ideas Access VS MySQL)Next Topic (oracle experts...pl/sql) New Topic New Poll Post Reply
AndreaVB Forum : Database : Finding out the number of records?
Poster Message
Neofireblaze
Level: Trainee

Registered: 15-10-2005
Posts: 3

icon Finding out the number of records?

Whats the code to do this? and if you wouldn't mind explaining the code thanks?

15-10-2005 at 12:52 PM
View Profile Send Email to User Show All Posts | Quote Reply
JLRodgers
Level: Moderator

Registered: 04-04-2002
Posts: 1617
icon Re: Finding out the number of records?

Well... depending on a number of factors (such as lock type), method of connecting....

assuming that adc is an adodb connection that's connected, and that ars is an adodb recordset that's opened.

ars.RecordCount

Of course you could just do a count of the table:
SELECT Count(*) FROM tablename




____________________________
Everywhere's Local (classifieds, job postings, & more for everycity in the world - user entered)

15-10-2005 at 06:03 PM
View Profile Send Email to User Show All Posts Visit Homepage | Quote Reply
Neofireblaze
Level: Trainee

Registered: 15-10-2005
Posts: 3
icon Re: Finding out the number of records?

quote:
JLRodgers wrote:
Well... depending on a number of factors (such as lock type), method of connecting....

assuming that adc is an adodb connection that's connected, and that ars is an adodb recordset that's opened.

ars.RecordCount

Of course you could just do a count of the table:
SELECT Count(*) FROM tablename





I have not a clue of what adob is . I'm a real begginer when it comes to visual basic. I still use regular records.
16-10-2005 at 02:05 PM
View Profile Send Email to User Show All Posts | Quote Reply
JLRodgers
Level: Moderator

Registered: 04-04-2002
Posts: 1617
icon Re: Finding out the number of records?

ADODB is the newer than DAO (right now, drastically newer)... as far as "normal records" I'm unaware to what you're referring to... unless it is DAO... but even DAO has a .RecordCount

If you don't know what DAO is either, you'll have to post whatever code you have -- for those are the only two items used for databases.

The only other thing I could think of is you might be referring to a dynamic array (ex: dim tmp() as string : redim tmp(5) ), in which case, you use LBound & UBound (for lower and upper number, typically always 0 for the lower, while the upper is what it's dimensioned or redimensioned for).


[Edited by JLRodgers on 16-10-2005 at 12:18 PM GMT]

____________________________
Everywhere's Local (classifieds, job postings, & more for everycity in the world - user entered)

16-10-2005 at 06:16 PM
View Profile Send Email to User Show All Posts Visit Homepage | Quote Reply
AndreaVB Forum : Database : Finding out the number of records?
Previous Topic (Ideas Access VS MySQL)Next Topic (oracle experts...pl/sql) New Topic New Poll Post Reply
Surf To:


Not Logged In? Username: Password: Lost your password?
Partners: Download Actual Software | Free Software Download
borderAndreaVB free resources for Visual Basic developersborder

borderAndreaVB Visual Basic and VB.NET source code resources - Copyright © 1999-2007 Andrea Tincaniborder