recordcount in ADO

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • MFS 43

    #1

    recordcount in ADO

    Have created recordset in ADO. I know there are a number of records in the
    recordset since I can move through them.

    However when I try to do a rst.RecordCount , I get "-1" as the count even if I
    do a rst.MoveFirst and rst.MoveLast before the rst.RecordCount .

    Any reason for this and any suggestions on correcting it?

    Thanks for the help in advance.
  • Tom van Stiphout

    #2
    Re: recordcount in ADO

    On 02 May 2004 17:57:12 GMT, mfs43@aol.com (MFS 43) wrote:

    Straight from the documentation:
    The cursor type of the Recordset object affects whether the number of
    records can be determined. The RecordCount property will return -1 for
    a forward-only cursor; the actual count for a static or keyset cursor;
    and either -1 or the actual count for a dynamic cursor, depending on
    the data source.

    -Tom.

    [color=blue]
    >Have created recordset in ADO. I know there are a number of records in the
    >recordset since I can move through them.
    >
    >However when I try to do a rst.RecordCount , I get "-1" as the count even if I
    >do a rst.MoveFirst and rst.MoveLast before the rst.RecordCount .
    >
    >Any reason for this and any suggestions on correcting it?
    >
    >Thanks for the help in advance.[/color]

    Comment

    • MFS 43

      #3
      Re: recordcount in ADO

      Thanks for the help.

      Comment

      Working...