Cannot get data into a recordset of an asp page
Posted on 2004-11-04
I am using MS SQL server with InterDev as an editor coding in html and asp. I have a web-based application
which resides in a subdirectory of another web-based application.
So the directory looks like this:
As you can see, the "RecognizeYourBestCustomers" web-based application is in a subdirectory of "RecognizeYourBestPerformers".
The "RecognizeYourBestPerformers" web-based app works fine.
Theses applications uses a .udl for the path. The .uld is suppose to have all of the path information inside of it to get to the
The "RecognizeYourBestPerformers" app points to the .uld. The "RecognizeYourBestCustomers" app also points to the same .udl.
Here is some of my code:
<TITLE>Recognize Your Best Customers Log-in Screen </TITLE>
<FORM name=frmInput method="get" action="process.asp">
<TD align=right>User Name:</TD>
<INPUT style="WIDTH: 100px" class=inptext name="txtUserName" id="txtUserName" type="text" >
<TD align=right >Password:</TD>
<TD align=left ><INPUT style="WIDTH: 100px" class=inptext maxlength=6 id="txtPassWord" name="txtPassWord" type="password" ></TD>
<INPUT class=button type=submit value=" Log-in " >
The system is suppose to go to the "process.asp" page and verify passwords. See the "Form" tag statement. The system does go
to the "process.asp" page, but I cannot get data from the server about the user's name role and password.
I have the following code in the process.asp page.
strConn = "Recognize.udl"
dim str_SQL, obj, rs
strSID = session.SessionID
strUserName = Request.Form("txtUserName")
strPassWord = Request.Form("txtPassWord")
str_SQL = "select * from tbls_users where (user_name = '" & strUserName & "') " & _
"and (role_password = '" & strPassWord & "')"
''Note: I use a SQLInstructions.SQL file to create a Server Object. I then use this object to execute the SQL statement
'to the server.
set rs = obj.execute(str_SQL,strConn)
if not rs.eof then 'If there are any records in the users table with a user name and password then proceed.
'Set session variables
session("strSessionID") = strSID
session.Timeout = 60
if rs("judge") = "fulltime" or rs("judge")="parttime" then
else 'If there are no records that match the user name and password then go back to the LoginScreen.
PROBLEM: I cannot get data from the recordset to determine if the user should be directed to the next page or be redirected
back to the same page. I tried "response.write rs("Judge")". That does not work.
Any comments from anyone as to why data in not being populated into the recordset of the "process.asp" page. The first web-based
application works fine. Is it possible that subdirectories why have something to do with it?