Wrox Home  
Search P2P Archive for: Go

  Return to Index  

access_asp thread: Access Error: System resource exceeded


Message #1 by kersting@a... on Tue, 8 Jan 2002 21:37:44
==========================================================================

//Platform: Win2K, IIS5

//Database: Microsoft Access 2000



Hi everyone,



Wondering if anyone has experienced this error message before....



"Microsoft OLE DB Provider for ODBC Drivers error '80070003'

(Microsoft){ODBC Microsoft Access Driver} System resource exceeded

/includes/login_script.asp, line 19"



The line the error message refers to is: "Set RS = OBJdbConnection.Execute

(SQL)"



All I can think of is that the dB is taking too much of a load from users 

when they're attempting to connect, or there is some sort of an infinite 

loop setup in my code somewhere (haven't been able to find one if this is 

the case). I could have as many as a couple hundred users attempting to 

access the dB at once. Would such an occurrence throw this error?



If this is the case, I'm guessing my only solution is to migrate to SQL 

Server.....unless there is something wrong with my script or global.asa 

where I make the original connection.



Also, I've found that this error isn't unique to this script....it 

randomly happens throughout my site when attempting to connect to the 

dB...and always throws the error on the "execute" line.



Any help is much appreciated! Thanks!



Here's my global.asa......



<SCRIPT LANGUAGE=VBScript RUNAT=Server>

Sub Application_OnStart

	'==FrontPage Generated - startspan==

	Dim FrontPage_UrlVars(1)

	'--Project Data Connection

		Application("pattersondb_ConnectionString") = "DRIVER

{Microsoft Access Driver (*.mdb)};DBQ=URL=/files/patterson.mdb"

		FrontPage_UrlVars(0) = "pattersondb_ConnectionString"

		Application("pattersondb_ConnectionTimeout") = 15

		Application("pattersondb_CommandTimeout") = 30

		Application("pattersondb_CursorLocation") = 3

		Application("pattersondb_RuntimeUserName") = ""

		Application("pattersondb_RuntimePassword") = ""

	'--

	Application("FrontPage_UrlVars") = FrontPage_UrlVars

	'==FrontPage Generated - endspan==

End Sub

Sub Session_OnStart

	FrontPage_StartSession '==FrontPage Generated==

End Sub

Sub FrontPage_StartSession

	On Error Resume Next

	if Len(Application("FrontPage_VRoot")) > 0 then Exit Sub

	' discover the VRoot for the current page;

	' walk back up VPath until we find global.asa

	Vroot = Request.ServerVariables("PATH_INFO")

	strG1 = "global.asa"

	strG2 = "Global.asa"

	iCount = 0

	do while Len(Vroot) > 1

		idx = InStrRev(Vroot, "/")

		if idx > 0 then

			Vroot = Left(Vroot,idx)

		else

			' error; assume root web

			Vroot = "/"

		end if

		if FrontPage_FileExists(Server.MapPath(Vroot & strG1)) 

then exit do

		if FrontPage_FileExists(Server.MapPath(Vroot & strG2)) 

then exit do

		if Right(Vroot,1) = "/" then Vroot = Left(Vroot,Len(Vroot)-

1)

		iCount = iCount + 1

		if iCount > 100 then

			' error; assume root web

			Vroot = "/"

			exit do

		end if

	loop

	' map all URL= attributes in _ConnectionString variables

	Application.Lock

	if Len(Application("FrontPage_VRoot")) = 0 then

		Application("FrontPage_VRoot") = Vroot

		UrlVarArray = Application("FrontPage_UrlVars")

		for i = 0 to UBound(UrlVarArray)

			if Len(UrlVarArray(i)) > 0 then FrontPage_MapUrl

(UrlVarArray(i))

		next

	end if

	Application.Unlock

End Sub

Sub FrontPage_MapUrl(AppVarName)

	' convert URL attribute in conn string to absolute file location

	strVal = Application(AppVarName)

	strKey = "URL="

	idxStart = InStr(strVal, strKey)

	If idxStart = 0 Then Exit Sub

	strBefore = Left(strVal, idxStart - 1)

	idxStart = idxStart + Len(strKey)

	idxEnd = InStr(idxStart, strVal, ";")

	If idxEnd = 0 Then

		strAfter = ""

		strURL = Mid(strVal, idxStart)

	Else

		strAfter = ";" & Mid(strVal, idxEnd + 1)

		strURL = Mid(strVal, idxStart, idxEnd - idxStart)

	End If

	strOut = strBefore & Server.MapPath(Application("FrontPage_VRoot") 

& strURL) & strAfter

	Application(AppVarName) = strOut

End Sub

Function FrontPage_FileExists(fspath)

	On Error Resume Next

	FrontPage_FileExists = False

	set fs = CreateObject("Scripting.FileSystemObject")

	Err.Clear

	set istream = fs.OpenTextFile(fspath)

	if Err.Number = 0 then

		FrontPage_FileExists = True

		istream.Close

	end if

	set istream = Nothing

	set fs = Nothing

End Function

Sub Session_OnStart



	' Initialize session variables



	'--Project Data Connection used for production Web site

	Session("DataConn_patterson") = "DSN=pattersondb_312757;DBQ=" & 

server.mappath("/") & "\files\patterson.mdb;DriverId=25;FIL=MS 

Access;MaxBufferSize=512;PageTimeout=5;"

	

	Session("DataConn_ConnectionTimeout") = 15

	Session("DataConn_CommandTimeout") = 30

	Session("DataConn_RuntimeUserName") = ""

	Session("DataConn_RuntimePassword") = ""



	Session("Authenticated") = 0

	Session("CurrentPage") = ""

	Session("mbr_Last_Name") = ""

	Session("mbr_First_Name") = ""

	Session("Membership_Type") = ""



End Sub

</SCRIPT>



==========================================================================
Message #2 by Thomas Bellavia <TBellavia@V...> on Wed, 9 Jan 2002 10:02:31 -0500
Try the following web site for starters...

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/odbc/htm/od

bcodbc_error_codes.asp



-----Original Message-----

From: kersting@a... [mailto:kersting@a...]

Sent: Tuesday, January 08, 2002 4:38 PM

To: Access ASP

Subject: [access_asp] Access Error: System resource exceeded





Advertise on P2P or become an official list sponsor.



Would you like your message to reach as many as 36,000 

professionals? Or 92,000? Or maybe even 1 million? 

Contact us (verag@w...) for more information on 

banner, button and newsletter advertising.

---

==========================================================================

//Platform: Win2K, IIS5

//Database: Microsoft Access 2000



Hi everyone,



Wondering if anyone has experienced this error message before....



"Microsoft OLE DB Provider for ODBC Drivers error '80070003'

(Microsoft){ODBC Microsoft Access Driver} System resource exceeded

/includes/login_script.asp, line 19"



The line the error message refers to is: "Set RS = OBJdbConnection.Execute

(SQL)"



All I can think of is that the dB is taking too much of a load from users 

when they're attempting to connect, or there is some sort of an infinite 

loop setup in my code somewhere (haven't been able to find one if this is 

the case). I could have as many as a couple hundred users attempting to 

access the dB at once. Would such an occurrence throw this error?



If this is the case, I'm guessing my only solution is to migrate to SQL 

Server.....unless there is something wrong with my script or global.asa 

where I make the original connection.



Also, I've found that this error isn't unique to this script....it 

randomly happens throughout my site when attempting to connect to the 

dB...and always throws the error on the "execute" line.



Any help is much appreciated! Thanks!



Here's my global.asa......



<SCRIPT LANGUAGE=VBScript RUNAT=Server>

Sub Application_OnStart

	'==FrontPage Generated - startspan==

	Dim FrontPage_UrlVars(1)

	'--Project Data Connection

		Application("pattersondb_ConnectionString") = "DRIVER

{Microsoft Access Driver (*.mdb)};DBQ=URL=/files/patterson.mdb"

		FrontPage_UrlVars(0) = "pattersondb_ConnectionString"

		Application("pattersondb_ConnectionTimeout") = 15

		Application("pattersondb_CommandTimeout") = 30

		Application("pattersondb_CursorLocation") = 3

		Application("pattersondb_RuntimeUserName") = ""

		Application("pattersondb_RuntimePassword") = ""

	'--

	Application("FrontPage_UrlVars") = FrontPage_UrlVars

	'==FrontPage Generated - endspan==

End Sub

Sub Session_OnStart

	FrontPage_StartSession '==FrontPage Generated==

End Sub

Sub FrontPage_StartSession

	On Error Resume Next

	if Len(Application("FrontPage_VRoot")) > 0 then Exit Sub

	' discover the VRoot for the current page;

	' walk back up VPath until we find global.asa

	Vroot = Request.ServerVariables("PATH_INFO")

	strG1 = "global.asa"

	strG2 = "Global.asa"

	iCount = 0

	do while Len(Vroot) > 1

		idx = InStrRev(Vroot, "/")

		if idx > 0 then

			Vroot = Left(Vroot,idx)

		else

			' error; assume root web

			Vroot = "/"

		end if

		if FrontPage_FileExists(Server.MapPath(Vroot & strG1)) 

then exit do

		if FrontPage_FileExists(Server.MapPath(Vroot & strG2)) 

then exit do

		if Right(Vroot,1) = "/" then Vroot = Left(Vroot,Len(Vroot)-

1)

		iCount = iCount + 1

		if iCount > 100 then

			' error; assume root web

			Vroot = "/"

			exit do

		end if

	loop

	' map all URL= attributes in _ConnectionString variables

	Application.Lock

	if Len(Application("FrontPage_VRoot")) = 0 then

		Application("FrontPage_VRoot") = Vroot

		UrlVarArray = Application("FrontPage_UrlVars")

		for i = 0 to UBound(UrlVarArray)

			if Len(UrlVarArray(i)) > 0 then FrontPage_MapUrl

(UrlVarArray(i))

		next

	end if

	Application.Unlock

End Sub

Sub FrontPage_MapUrl(AppVarName)

	' convert URL attribute in conn string to absolute file location

	strVal = Application(AppVarName)

	strKey = "URL="

	idxStart = InStr(strVal, strKey)

	If idxStart = 0 Then Exit Sub

	strBefore = Left(strVal, idxStart - 1)

	idxStart = idxStart + Len(strKey)

	idxEnd = InStr(idxStart, strVal, ";")

	If idxEnd = 0 Then

		strAfter = ""

		strURL = Mid(strVal, idxStart)

	Else

		strAfter = ";" & Mid(strVal, idxEnd + 1)

		strURL = Mid(strVal, idxStart, idxEnd - idxStart)

	End If

	strOut = strBefore & Server.MapPath(Application("FrontPage_VRoot") 

& strURL) & strAfter

	Application(AppVarName) = strOut

End Sub

Function FrontPage_FileExists(fspath)

	On Error Resume Next

	FrontPage_FileExists = False

	set fs = CreateObject("Scripting.FileSystemObject")

	Err.Clear

	set istream = fs.OpenTextFile(fspath)

	if Err.Number = 0 then

		FrontPage_FileExists = True

		istream.Close

	end if

	set istream = Nothing

	set fs = Nothing

End Function

Sub Session_OnStart



	' Initialize session variables



	'--Project Data Connection used for production Web site

	Session("DataConn_patterson") = "DSN=pattersondb_312757;DBQ=" & 

server.mappath("/") & "\files\patterson.mdb;DriverId=25;FIL=MS 

Access;MaxBufferSize=512;PageTimeout=5;"

	

	Session("DataConn_ConnectionTimeout") = 15

	Session("DataConn_CommandTimeout") = 30

	Session("DataConn_RuntimeUserName") = ""

	Session("DataConn_RuntimePassword") = ""



	Session("Authenticated") = 0

	Session("CurrentPage") = ""

	Session("mbr_Last_Name") = ""

	Session("mbr_First_Name") = ""

	Session("Membership_Type") = ""



End Sub

</SCRIPT>



==========================================================================





  Return to Index