Results 1 to 2 of 2

Thread: patrick

  1. #1
    Join Date
    Dec 1969

    Default patrick

    I am rewriting a logon page to work with 3 types of customers instead of just one. The type of customer is based on one of three queries returning a customer id. How do I determine if no recordset was returned. Is there a recordset exists feature?<BR><BR>This is my current code:<BR><BR> cust = 5<BR><BR><BR> If NOT(rsLogonD.EOF) Then<BR> cust = 3<BR> Else cust = cust<BR> End If<BR><BR> If NOT(rsLogonC.EOF) Then<BR> cust = 2<BR> Else cust = cust<BR> End If<BR><BR> If NOT(rsLogonB.EOF) Then<BR> cust = 1<BR> Else cust = cust<BR> End If<BR><BR><BR>response.write "&#039;" & cust & "&#039;"<BR><BR>I keep getting 5 (internal test) as the answer written out to my page,.<BR>when i know rsLogonC brings a record<BR><BR>Any help would be appreciated<BR>

  2. #2
    Join Date
    Dec 1969

    Default Recordset

    Try it this way...<BR><BR> connectstring<BR>SQL = "Select * from table where customer_id = " & idvalue<BR>set objrec = objconn.execute(SQL)<BR><BR>if objrec.eof then<BR> (Nothing was returned)<BR>end if<BR>objconn.close<BR>set objrec = nothing<BR><BR>I am not sure how you are determining what group the person belongs to, but this sequence may give you some direction...<BR><BR>-- Whol

Posting Permissions

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