jasonseay Posted October 8, 2003 Posted October 8, 2003 i need a simple way in vb .net to get a record count from an adodb recordset. does anyone know a way without going through the records and counting them? Quote
Moderators Robby Posted October 8, 2003 Moderators Posted October 8, 2003 Wouldn't you rather use ADO.NET? Quote Visit...Bassic Software
jasonseay Posted October 9, 2003 Author Posted October 9, 2003 i tried recordset.recordcount and it gives me -1. any ideas? Quote
Moderators Robby Posted October 9, 2003 Moderators Posted October 9, 2003 use a dynamic cursor. Quote Visit...Bassic Software
wyrd Posted October 10, 2003 Posted October 10, 2003 You could always save yourself the hassle and query your db for a COUNT(*). Quote Gamer extraordinaire. Programmer wannabe.
pendragon Posted October 10, 2003 Posted October 10, 2003 When I was learning ADO I think I read somewhere that if you are using a non-dynamic cursor then recordset.movelast should update the recordcount to the correct number of records, but as Robby says a dynamic cusors should return the correct number. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.