Results 1 to 3 of 3

Thread: Unable to detect empy recordset

  1. #1
    Kate Golding Guest

    Unable to detect empy recordset

    Using RS.EOF to test for an empty recordset worked fine when using Access databases. Since the database was upsized to MS SQL, the same code fails to find the end of file for empty recordsets and so moves into an infinite loop.

    I'm using
    while not RS.EOF
    ' output the record information
    wend

    Kate

  2. #2
    Guest

    Unable to detect empy recordset (reply)

    Oops... That should read as below


    ------------
    Kate Golding at 1/5/00 10:03:15 PM

    Using RS.EOF to test for an empty recordset worked fine when using Access databases. Since the database was upsized to MS SQL, the same code fails to find the end of file for empty recordsets and so moves into an infinite loop.

    I'm using
    while not RS.EOF
    ' output the record information
    RS.MoveNext
    wend

    Kate

  3. #3
    Frank Guest

    Unable to detect empy recordset (reply)


    You are in the wrong forum .. but here is a solution -

    CountSQL=SELECT COUNT(*) FROM table
    oRs.Open CountSQL, oConn, 0
    dbempty=(oRs(0)=0)
    oRs.Close

    Now, you can do whatever you want according to dbempty.

    Take the short cut, get a copy of ASPDB (www.aspdb.com) and you will have no more trouble.


    Fk


    ------------
    at 1/5/00 10:06:36 PM

    Oops... That should read as below


    ------------
    Kate Golding at 1/5/00 10:03:15 PM

    Using RS.EOF to test for an empty recordset worked fine when using Access databases. Since the database was upsized to MS SQL, the same code fails to find the end of file for empty recordsets and so moves into an infinite loop.

    I'm using
    while not RS.EOF
    ' output the record information
    RS.MoveNext
    wend

    Kate

Posting Permissions

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