recordset variable

Results 1 to 3 of 3

Thread: recordset variable

  1. #1
    Join Date
    Dec 1969

    Default recordset variable

    Can i get bvariable in the first page like this<BR>set rs = objDC.execute("select balance from sharesuser where UserName = &#039;" & Session("strLogin") & "&#039; ") <BR>if not rs.eof then<BR>balvarialbe = rs("balance") <BR>else<BR>&#039;no records in db<BR>end if and then pass it to the second page.<BR>How would i pass it to the second page

  2. #2
    Eddie Campbell Guest

    Default RE: recordset variable

    Not sure if this is what you are after, but ...<BR><BR>if not rs.eof then<BR> balvarialbe = rs("balance") <BR>else<BR> balvarialbe = "N/A"<BR>End If<BR>Response.Redirect("Page2.Asp?balvarialbe=" & balvarialbe)<BR><BR>Then on Page2.Asp you can retrieve it like this<BR><BR>balvarialbe = Request.QueryString("balvarialbe")<BR><BR>If balvarialbe = "N/A" Then<BR>&#039; No records found<BR>else<BR>&#039; records were found<BR>End If

  3. #3
    Join Date
    Dec 1969

    Default RE: recordset variable

    post it from a form or use the query string<BR>if redirecting to the second page then the latter is probably simpler<BR><BR>response.redirect("secondpage.asp?b variable=" & rs("balance"))<BR><BR>in second page you would refer to your variable as<BR><BR>request.QueryString("bvariable")<BR><BR> <BR><BR>...another alternative would be to use a session variable - the value would not be visible in the URL either.

Posting Permissions

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