rs.GetRows Question

Results 1 to 2 of 2

Thread: rs.GetRows Question

  1. #1
    Mike H. Guest

    Default rs.GetRows Question

    What will happen if I try to use the GetRows method on an empty recordset? Do I get some kind of return code that will signal this? i.e., if in the following code a user typed an incorrect value for the groupid field<BR><BR>strSQL = "SELECT name, address FROM table1 WHERE group = &#039;" & Request.Form("groupid") & "&#039;"<BR>rs.Open strSQL, dbConn, adOpenForwardOnly, adLockReadOnly<BR>arNames = rs.GetRows<BR>rs.Close<BR>set rs = nothing<BR>for i = 0 to uBound(arNames, 2)<BR> ...<BR>next<BR><BR>How will I know not to do the loop if I had an empty recordset?<BR><BR>Thanks,<BR>Mike<BR>

  2. #2
    Join Date
    Dec 1969

    Default RE: rs.GetRows Question

    if (not (rs.eof)) then<BR><BR>Your Code<BR><BR>end if

Posting Permissions

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