something like recordcount?

Discussion in 'ASP .Net Datagrid Control' started by phil, May 8, 2006.

  1. phil

    phil Guest

    Hi,

    Does it exist a function or method like 'recordcount' of the asp 2.0?
    Thanks
    Phil
     
    phil, May 8, 2006
    #1
    1. Advertising

  2. Yes but you need to use a way to get it

    dim dReader as SqlDataReader

    command.open()
    dReader = command.ExecuteReader()

    dReader.VisibleFieldCount() returns an integer with the number of rows

    you can read all the fields with

    While dReader.read()
    name = dReader.Item("columnName")
    End While

    --

    Bruno Alexandre
    (a Portuguese in Denmark)



    "phil" <> escreveu na mensagem
    news:...
    > Hi,
    >
    > Does it exist a function or method like 'recordcount' of the asp 2.0?
    > Thanks
    > Phil
    >
    >
     
    Bruno Alexandre, May 8, 2006
    #2
    1. Advertising

  3. phil

    phil Guest

    Thanks

    "Bruno Alexandre" <> wrote in message
    news:...
    > Yes but you need to use a way to get it
    >
    > dim dReader as SqlDataReader
    >
    > command.open()
    > dReader = command.ExecuteReader()
    >
    > dReader.VisibleFieldCount() returns an integer with the number of rows
    >
    > you can read all the fields with
    >
    > While dReader.read()
    > name = dReader.Item("columnName")
    > End While
    >
    > --
    >
    > Bruno Alexandre
    > (a Portuguese in Denmark)
    >
    >
    >
    > "phil" <> escreveu na mensagem
    > news:...
    > > Hi,
    > >
    > > Does it exist a function or method like 'recordcount' of the asp 2.0?
    > > Thanks
    > > Phil
    > >
    > >

    >
    >
     
    phil, May 8, 2006
    #3
  4. phil

    phil Guest

    Hi Bruno,

    I tried dReader.VisibleFieldCount() but this gives the number of fields, not
    the number of records (or rows).

    "Bruno Alexandre" <> wrote in message
    news:...
    > Yes but you need to use a way to get it
    >
    > dim dReader as SqlDataReader
    >
    > command.open()
    > dReader = command.ExecuteReader()
    >
    > dReader.VisibleFieldCount() returns an integer with the number of rows
    >
    > you can read all the fields with
    >
    > While dReader.read()
    > name = dReader.Item("columnName")
    > End While
    >
    > --
    >
    > Bruno Alexandre
    > (a Portuguese in Denmark)
    >
    >
    >
    > "phil" <> escreveu na mensagem
    > news:...
    > > Hi,
    > >
    > > Does it exist a function or method like 'recordcount' of the asp 2.0?
    > > Thanks
    > > Phil
    > >
    > >

    >
    >
     
    phil, May 9, 2006
    #4
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Steve Caliendo

    RecordCount of a datareader

    Steve Caliendo, Jun 2, 2004, in forum: ASP .Net
    Replies:
    1
    Views:
    1,407
    John Oakes
    Jun 2, 2004
  2. Daan
    Replies:
    4
    Views:
    15,577
    chris22smith
    Mar 18, 2009
  3. Replies:
    2
    Views:
    2,855
    Peter Rilling
    Oct 13, 2005
  4. =?Utf-8?B?UGF1bA==?=

    DataReader and RecordCount

    =?Utf-8?B?UGF1bA==?=, Oct 21, 2005, in forum: ASP .Net
    Replies:
    9
    Views:
    37,822
    Patrick.O.Ige
    Oct 22, 2005
  5. dmitrey
    Replies:
    5
    Views:
    410
    Jussi Piitulainen
    Apr 20, 2012
Loading...

Share This Page