Solved

how do i get "rows count" by using OdbcDataReader

Posted on 2006-06-09
3
1,079 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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Suggested Solutions

Sometimes in DotNetNuke module development you want to swap controls within the same module definition.  In doing this DNN (somewhat annoyingly) swaps the Skin and Container definitions to the default admin selections.  To get around this you need t…
In an ASP.NET application, I faced some technical problems. In this article, I list them out and show the solutions that I found.  I hope it will be useful. Problem: After closing a pop-up window, the parent page should be refreshed automaticall…
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…
Finding and deleting duplicate (picture) files can be a time consuming task. My wife and I, our three kids and their families all share one dilemma: Managing our pictures. Between desktops, laptops, phones, tablets, and cameras; over the last decade…

696 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