Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

how do i get "rows count" by using OdbcDataReader

Posted on 2006-06-09
3
Medium Priority
?
1,153 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 Ageil earned 200 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

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

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

ASP.Net to Oracle Connectivity Recently I had to develop an ASP.NET application connecting to an Oracle database.As I am doing it first time ,I had to solve several problems. This article will help to such developers  to develop an ASP.NET client…
It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
Want to learn how to record your desktop screen without having to use an outside camera. Click on this video and learn how to use the cool google extension called "Screencastify"! Step 1: Open a new google tab Step 2: Go to the left hand upper corn…
Please read the paragraph below before following the instructions in the video — there are important caveats in the paragraph that I did not mention in the video. If your PaperPort 12 or PaperPort 14 is failing to start, or crashing, or hanging, …

604 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