Solved

Max. Session number exceeded error !

Posted on 2003-12-09
4
757 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

Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

Join & Write a Comment

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 …
I was asked about the differences between classic ASP and ASP.NET, so let me put them down here, for reference: Let's make the introductions... Classic ASP was launched by Microsoft in 1998 and dynamically generate web pages upon user interact…
Here's a very brief overview of the methods PRTG Network Monitor (https://www.paessler.com/prtg) offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

747 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

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now