|
-
Jun 7th, 2008, 03:20 AM
#1
Thread Starter
Junior Member
[RESOLVED] [2008] Ado.net
What is the VB 2008 syntax for Recordset.recordcount (VB 6) ?
-
Jun 7th, 2008, 03:27 AM
#2
Re: [2008] Ado.net
Well, if you're not using a Recordset then there is no equivalent syntax. If you are using a Recordset then it would be the same. If you have a DataTable then it has a Rows collection and, just like every collection, it has a Count property. If you're getting your data from a DataReader then there is no way to know how many records are available until you've read them all.
-
Jun 7th, 2008, 03:36 AM
#3
Thread Starter
Junior Member
Re: [2008] Ado.net
Well I understand what you said but I don't know the syntax in VB2008. Can you please provide me with a sample code to enable me to understand total usage of recordset in VB 2008.
-
Jun 7th, 2008, 04:04 AM
#4
Re: [2008] Ado.net
Recordsets are not part of ADO.NET. They are ADO, which you can use in VB.NET but you shouldn't. You should follow the Data Access link in my signature for some ADO.NET code examples. You first need to decide exactly how to access your data. If you decide to populate a DataTable I've already told you how to get the record count: from its Rows.Count property. If you want to "understand total usage" of the DataTable class then I suggest that you read the documentation for that class. If you have a specific issue with its usage then by al means post a question but this forum is not a substitute for the reference material you already.
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
|