Solved

Max. Session number exceeded error !

Posted on 2003-12-09
4
765 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

I recently decide that I needed a way to make my pages scream on the net.   While searching around how I can accomplish this I stumbled across a great article that stated "minimize the server requests." I got to thinking, hey, I use more than one…
Have you ever needed to get an ASP script to wait for a while? I have, just to let something else happen. Or in my case, to allow other stuff to happen while I was murdering my MySQL database with an update. The Original Issue This was written…
Come and listen to Percona CEO Peter Zaitsev discuss what’s new in Percona open source software, including Percona Server for MySQL (https://www.percona.com/software/mysql-database/percona-server) and MongoDB (https://www.percona.com/software/mongo-…
Michael from AdRem Software outlines event notifications and Automatic Corrective Actions in network monitoring. Automatic Corrective Actions are scripts, which can automatically run upon discovery of a certain undesirable condition in your network.…

696 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