myRecordset.RecordCount doesn't work

Results 1 to 6 of 6

Thread: myRecordset.RecordCount doesn't work

  1. #1
    Kris Herlaar Guest

    Default myRecordset.RecordCount doesn't work

    Hiya,<BR><BR>I just started learning ASP a week ago, and i can&#039;t seem to get the recordcount property to work, it always holds -1 even if i execute "SELECT * FROM tblPhoneNums;" which in Access returns 8 records. if i ignore the recordcount property in my ASP page, and still build the results table, i DO get all 8 records. however if the query becomes more complicated, it flunks completely. "SELECT * FROM tblPhoneNums WHERE owner LIKE &#039;*w*&#039;;" returns 3 records in Access, and an ADODB error in ASP...<BR><BR>Can someone please tell me what i&#039;m doing wrong? or how i can work around this?<BR><BR>Kris (

  2. #2
    Ed Guest

    Default RE: myRecordset.RecordCount doesn't work

    R&D your cursor... I believe this in the FAQ...<BR><BR>I have not had much luck, so I always use:<BR><BR>select count(*) as cnt from table...<BR><BR>Number of records is: &#060;%= rst("cnt") %&#062;

  3. #3
    Ed Guest

    Default 4guys article on cursors

  4. #4
    Join Date
    Dec 1969

    Default RE: myRecordset.RecordCount doesn't work

    Wow guys! that&#039;s fast (less then 15 minutes!) thanks a heap.

  5. #5
    Join Date
    Dec 1969

    Default RE: myRecordset.RecordCount doesn't work

    Move your recordset .movelast then .movefirst. Then the .recordcount should be correct...

  6. #6
    No! Guest

    Default Never do that... Read this...

Posting Permissions

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