Solved

Max. Session number exceeded error !

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
ASP VB... 7 99
ASP equivalent to Windows findstr 3 71
Sorting - Classic asp putting a specific text @ the top of the table 3 40
Forcing form refresh - classic ASP 7 57
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…
This demonstration started out as a follow up to some recently posted questions on the subject of logging in: http://www.experts-exchange.com/Programming/Languages/Scripting/JavaScript/Q_28634665.html and http://www.experts-exchange.com/Programming/…
This Micro Tutorial will teach you how to censor certain areas of your screen. The example in this video will show a little boy's face being blurred. This will be demonstrated using Adobe Premiere Pro CS6.
This Micro Tutorial hows how you can integrate  Mac OSX to a Windows Active Directory Domain. Apple has made it easy to allow users to bind their macs to a windows domain with relative ease. The following video show how to bind OSX Mavericks to …

910 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

18 Experts available now in Live!

Get 1:1 Help Now