Solved

how do i get "rows count" by using OdbcDataReader

Posted on 2006-06-09
3
1,099 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 27

Accepted Solution

by:
Sammy earned 50 total points
ID: 16875272
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

On Demand Webinar: Networking for the Cloud Era

Ready to improve network connectivity? Watch this webinar to learn how SD-WANs and a one-click instant connect tool can boost provisions, deployment, and management of your cloud connection.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction This article shows how to use the open source plupload control to upload multiple images. The images are resized on the client side before uploading and the upload is done in chunks. Background I had to provide a way for user…
International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
This video Micro Tutorial shows how to password-protect PDF files with free software. Many software products can do this, such as Adobe Acrobat (but not Adobe Reader), Nuance PaperPort, and Nuance Power PDF, but they are not free products. This vide…
This is my first video review of Microsoft Bookings, I will be doing a part two with a bit more information, but wanted to get this out to you folks.

688 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