Solved

how do i get "rows count" by using OdbcDataReader

Posted on 2006-06-09
3
1,051 Views
Last Modified: 2008-02-01
the following is my code for execute query.. i wonder how do i get the total of rows count

Dim cmd As New OdbcCommand(Str, MyConn)
    Dim cmdreader As OdbcDataReader

    Dim Str = "SELECT name FROM user"
    cmd.CommandText = Str

        Try

            MyConn.Open()
            cmdreader = cmd.ExecuteReader()

            if cmdreader.HasRows Then
               //////     rows count    //////////////
            end if

        End Try  
0
Comment
Question by:kengkit
3 Comments
 
LVL 27

Accepted Solution

by:
Sammy earned 50 total points
Comment Utility
There is no way you can do that with datareader out of the box, but there is a work around and you can see it here
http://www.devx.com/vb2themax/Tip/18807
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

In this Article, I will provide a few tips in problem and solution manner. Opening an ASPX page in Visual studio 2003 is very slow. To make it fast, please do follow below steps:   Open the Solution/Project. Right click the ASPX file to b…
IntroductionWhile developing web applications, a single page might contain many regions and each region might contain many number of controls with the capability to perform  postback. Many times you might need to perform some action on an ASP.NET po…
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…
Here's a very brief overview of the methods PRTG Network Monitor (https://www.paessler.com/prtg) offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…

772 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now