Recordcount not working

Results 1 to 3 of 3

Thread: Recordcount not working

  1. #1
    Shail Guest

    Default Recordcount not working

    When i say recordset.recordcount it returns -1. What are the exact parameters to be given?<BR>Thanks

  2. #2
    rahul Guest

    Default RE: Recordcount not working

    Here is one example of record count.since for recordcount it need rcih curser.I am using number rather than words for curser.<BR>&#060;% dim con,rs<BR>set con=server.createobject("adodb.connection")<BR>con .open"provider=microsoft.jet.oledb.4.0;data source=\serverdatabase.mdb"<BR>set rs=server.createobject("adodb.recordset")<BR>rs.op en "select * from database where departement=&#03902&#039",con,3<BR>%&#062;<BR>&#06 0;%mycount=rs.recordcount%&#062;<BR>total employees are&#060;%=mycount%&#062;<BR>&#060;%rs.close<BR>se t rs=nothing<BR>set con=nothing%&#062;

  3. #3
    Join Date
    Dec 1969

    Default RE: Recordcount not working

    Hi,<BR>Not all the recordset types support the recordcount property.<BR>From MSDN help:<BR>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.<BR>Hope this helps.

Posting Permissions

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