Is this possible

Results 1 to 2 of 2

Thread: Is this possible

  1. #1
    Join Date
    Dec 1969

    Default Is this possible

    I have three pages that can come up from my sign up page<BR><BR>and i have them directed by an if statement.<BR><BR>Does this code look like it can work, im getting an unable to display message.<BR><BR>&#060;%<BR><BR>Dim Conn<BR>Dim RSUser<BR>Dim SQL<BR><BR>Set Conn=Server.CreateObject("ADODB.Connection")<BR>Se t RSUser = Server.CreateObject("ADODB.Recordset")<BR><BR>Conn .Open "DSN=ITO2;UID=sa;PWD=;"<BR><BR>SQL = "Select * from ITO2..PILOT_QUIZ_LOGINFO where User_Name =&#039;" & Request.Form("User_Name") & "&#039;"<BR><BR>RSUser.Source = SQL<BR>Set RSUser.ActiveConnection = Conn<BR>RSUser.CursorType = 1 &#039;Keyset<BR>RSUser.LockType = 2 &#039;Pessimistic<BR>RSUser.Open<BR>%&#062;<BR><BR ><BR> &#060;%<BR> If RSUser.EOF then<BR> response.redirect("Bad_UserName.asp")<BR> %&#062;<BR><BR><BR> &#060;%<BR> Else If RSUser("Emp_Id") &#060;&#062; Request.Form("Emp_Id") Then<BR> response.redirect("Bad_EmpId.asp") <BR> %&#062;<BR> <BR>&#060;% <BR> Else<BR> Session.Timeout= 120<BR> Session("USR_First_Name") = RSUser("First_Name") & " " & RSUser("Last_Name")<BR> <BR> response.redirect("Main_Option.asp")<BR>%&#062;<BR >

  2. #2
    Join Date
    Dec 1969

    Default RE: Is this possible

    Change SQL to only pull the fields you need. Also, might the ITO2.. be screwing things up?<BR><BR>SQL = "Select emp_id, first_name, last_name from PILOT_QUIZ_LOGINFO where User_Name =&#039;" & Request.Form("User_Name") & "&#039;"<BR><BR>and add an &#039;end if&#039; at the end of the page<BR>

Posting Permissions

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