[Last Call] Learn about multicloud storage options and how to improve your company's cloud strategy. Register Now

x
?
Solved

Max. Session number exceeded error !

Posted on 2003-12-09
4
Medium Priority
?
770 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 105 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

Tech or Treat!

Submit an article about your scariest tech experience—and the solution—and you’ll be automatically entered to win one of 4 fantastic tech gadgets.

Question has a verified solution.

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

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 informatio…
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…
Have you created a query with information for a calendar? ... and then, abra-cadabra, the calendar is done?! I am going to show you how to make that happen. Visualize your data!  ... really see it To use the code to create a calendar from a q…
How to fix incompatible JVM issue while installing Eclipse While installing Eclipse in windows, got one error like above and unable to proceed with the installation. This video describes how to successfully install Eclipse. How to solve incompa…

650 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