Solved

Max. Session number exceeded error !

Posted on 2003-12-09
4
762 Views
Last Modified: 2007-12-19
Hi,
I am getting the following error
Misrosoft OLE DB Provider for ODBC Drivers (0x80004005)
[Oracle][ODBC][Ora]ORA-00604: error occurred at recursive SQL level 1 ORA-00018: maximum number of sessions exceeded
/in/mis/DSNName.inc, line 4

Here's the code:-

username=REQUEST.FORM("username")
password=REQUEST.FORM("password")
set adoRec=Server.CreateObject("ADODB.Recordset")
set adoRec.ActiveConnection=adoCon
adoRec.cursortype=adoDynamic

set adoRec2=Server.CreateObject("ADODB.Recordset")
set adoRec2.ActiveConnection=adoCon
adoRec2.cursortype=adoDynamic

sql="select count(*) from authenticate where username='" & username & "'  and password= '" & password & "'"
adoRec.open sql

if adoRec(0)>0 then
sql2="select flag from authenticate where username='" & username & "'"
adoRec2.open sql2
                  
                if flag<>1 then                         '@1
      server.transfer("chg_pwd.asp")  '@2
      else                                         '@3  
      Session("name")=username
      response.redirect "check.asp"    
      end if                                       '@4  
            
      else
      errorMessage = "You are not Authorized to go beyond."
      end if
end if

I am getting the error(nearly every time) only if I add the lines marked @1-@4. Otherwise everything works fine. I don't undertand why. Any ideas ?? Or any other way to do this ??
0
Comment
Question by:funkmail
  • 3
4 Comments
 
LVL 6

Expert Comment

by:Programming_Gal
ID: 9909942
if (flag<>1) then                         '@1
     server.transfer("chg_pwd.asp")  '@2
     else                                         '@3  
     Session("name")=username
     response.redirect "check.asp"    
end if          
**********************
Try to use this and see whether the error will occur or not
0
 
LVL 6

Accepted Solution

by:
Programming_Gal earned 35 total points
ID: 9909959
flag = adoRec2("flag")

if (flag<>1) then                         '@1
     server.transfer("chg_pwd.asp")  '@2
     else                                         '@3  
     Session("name")=username
     response.redirect "check.asp"    
end if          
**********************
Try to use this and see whether the error will occur or not

 
 
0
 

Author Comment

by:funkmail
ID: 9910426
I have already tried the second alternative both but sill the error comes. SO what I have done is done all this checking on the page check.asp. There it is working perfectly fine.

I couldn't understand what the problem was. If the flag value was 1, then there wasn't any problem. But when it is not set to 1, then the problem comes.

Anyhow you can still have the points

0
 
LVL 6

Expert Comment

by:Programming_Gal
ID: 9910450
response.redirect("check.asp")
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
ASP Focus problem 3 67
If-Then-Else ASP problem 6 67
Change visitor's REMOTE_ADDR to server's REMOTE_ADDR 2 38
Html value of radio 14 27
I have helped a lot of people on EE with their coding sources and have enjoyed near about every minute of it. Sometimes it can get a little tedious but it is always a challenge and the one thing that I always say is:  The Exchange of information …
Hello, all! I just recently started using Microsoft's IIS 7.5 within Windows 7, as I just downloaded and installed the 90 day trial of Windows 7. (Got to love Microsoft for allowing 90 days) The main reason for downloading and testing Windows 7 is t…

840 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question