Results 1 to 4 of 4

Thread: RS.Rows.count=?

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Jun 1999
    Location
    ma,usa
    Posts
    485
    code:
    <%=RS.Rows.count%>
    This returns an error. All I want to do is know how many rows in my access db. How do I do this?

  2. #2
    Fanatic Member Jerry Grant's Avatar
    Join Date
    Jul 2000
    Location
    Dorset, UK
    Posts
    810
    Try <%=RS.RecordCount%>

    Jerry Grant................tnarG yrreJ
    Website: <JG-Design></.net>
    Email: [email protected]
    Working towards a bug free world......
    (Not a Microsoft employee)

  3. #3

    Thread Starter
    Hyperactive Member
    Join Date
    Jun 1999
    Location
    ma,usa
    Posts
    485

    Unhappy

    This returns -1 for me. I looked through the sight and came up with this loosing answer:

    <% RS.movelast%>
    <% =RS.RecordCount%><br>
    <% RS.movefirst%>

    <% =RS.fields.Count-1%><br>

    THIS DOESN'T WORK. I get this error:

    Microsoft OLE DB Provider for ODBC Drivers error '80040e24'
    The rowset does not support fetching backwards
    /HelpMeWith/My.asp, line 163

    PLEASE HELP!

  4. #4
    Frenzied Member monte96's Avatar
    Join Date
    Sep 2000
    Location
    Somewhere in AZ
    Posts
    1,379
    1) Make sure you are using a cursortype other than adOpenForwardOnly.

    2) Make sure you are using a client side cursor location.

    3) Do a movelast then a movefirst then check recordcount.

    Just FYI- According to Microsoft, recordcount is only 100% accurate when the recordset is based on a table and not a query.
    oOOo--oOOo
    __/\/\onte96
    oOOo--oOOo
    Senior Programmer/Analyst
    MCP
    [email protected]
    [email protected]


    Your results may vary.. some restrictions may apply.. pricing and participation may vary.. not available in all states.. professional driver closed course..quantities limited..

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width