RecordCount Of Recordset

Results 1 to 3 of 3

Thread: RecordCount Of Recordset

  1. #1
    Swarnendu Banerjee Guest

    Default RecordCount Of Recordset

    When I am populating a recordset by executing a Stored Procs, I am not getting the exact RecordCount - it is always coming as -1<BR>What I did was :<BR>Set rs = cn.Execute("up_StoredProcs 1,1999)<BR>Response.write rs.RecordCount<BR><BR>--- The value was showing -1<BR>Please help me out<BR><BR>Thanx

  2. #2
    Join Date
    Dec 1969

    Default RE: RecordCount Of Recordset

    hi,<BR><BR>go to for the answer. there they teach pple to do a correct recordcount.<BR><BR>:-)<BR>baby johnson

  3. #3
    Join Date
    Dec 1969

    Default RE: RecordCount Of Recordset

    Try something like this:<BR><BR>&#039get number of open cases<BR>Set conn = Server.CreateObject("ADODB.Connection")<BR>conn.op en Application("yourdsninfo") <BR>sql = "SELECT count(*) as TotalRecords FROM Table"<BR>Set rs = Server.CreateObject("ADODB.Recordset")<BR>rs.Open sql, conn, 3, 3<BR><BR>You can then access the count by referencing the rs.fields("TotalRecords").value<BR><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