Wrox Home  
Search P2P Archive for: Go

  Return to Index  

access_asp thread: Re: asp pages fail every few hours/days


Message #1 by ianp@p... on Mon, 17 Feb 2003 23:38:26
> Very frustrating.
> 
> Currently I have asp pages that connect to an Access 2000 database using 
a 
> system DNS. This database is accessed through the web as well as 
directly 
> with MS Access. What I have been finding is that over time (usually a 
few 
> days) the asp pages fail with the following errors
> 
> HTTP 500.100 - Internal Server Error - ASP error
> Internet Information Services
> Error Type:
> Microsoft OLE DB Provider for ODBC Drivers (0x80004005) [Microsoft][ODBC 
> Microsoft Access Driver] The database has been placed in a state by an 
> unknown user that prevents it from being opened or locked.
> /dreamweaver/Work_Order_Querys/Query_El_notcomp_both_priority.asp, line 
29
> Page:
> GET /dreamweaver/Work_Order_Querys/Query_El_notcomp_both_priority.asp 
> 
> OR
> 
> HTTP 500.100 - Internal Server Error - ASP error
> Internet Information Services
> Error Type:
> Provider (0x80004005) Unspecified error
> /dreamweaver/Work_Order_Querys/Query_El_notcomp_SD_priority.asp, line 29
> Page:
> GET /dreamweaver/Work_Order_Querys/Query_El_notcomp_SD_priority.asp
> 
> 995 of the errors are the last one.
> 
> The internet guest account has full permissions to the directory that 
> contains the database. Page Timeout value is already set at 5000.
> 
> line 29 is:
> Query_All_Work_Orders.ActiveConnection = MM_Web_Work_Order_STRING
> 
> Any ideas why this is happening? I read somewhere that you can?t allow 
> access to a db file through asp and MS Access at the same time?
> 
> This is really getting frustrating, as I need to reboot the box every 
few 
> days.
> 
> Any help would be greatly appreciated!
>
I've recently had exactly this problem. Some time when refreshed the error 
would go away. 
I found a solution at http://www.dotnetforums.net/t49752.html.
Its an IIS setting thats causing it

no need to give up dreamweaver just yet :)
hope it works ok
I P
 
Message #2 by "Ken Schaefer" <ken@a...> on Tue, 18 Feb 2003 12:49:11 +1100
The first error indicates that the ODBC driver things that your database is
*corrupt*

The second error I find is usually caused by using the ODBC driver:
www.adopenstatic.com/faq/whyOLEDB.asp
Use the native Jet OLEDB Provider instead.

Lastly, this:
Query_All_Work_Orders.ActiveConnection = MM_Web_Work_Order_STRING
is not a good way to code your pages (assuming that Query_All_Work_Orders is
a recordset object - I can't really tell since you don't have an obvious
naming convention).

You are creating an ADO connection implicitly, and since you have no
reference to it, you can't return it to the connection pool. See:
http://support.microsoft.com/default.aspx?scid=kb;EN-US;191572
and
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnmdac/html
/pooling2.asp

Always explicitly create and open an ADO Connection *object*, and use this
when opening the recordset:

<%
Set objConn = Server.CreateObject("ADODB.Connection")
objConn.Open MM_Web_Work_Order_STRING

Set objRS = Server.CreateObject("ADODB.Recordset")
Set objRS.ActiveConnection = objConn
'
'
objRS.Close
Set objRS = Nothing

objConn.Close
Set objConn = Nothing
%>
Cheers
Ken

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
From: <ianp@p...>
Subject: [access_asp] Re: asp pages fail every few hours/days


: > Currently I have asp pages that connect to an Access 2000 database using
: > a system DNS. This database is accessed through the web as well as
: > directly with MS Access. What I have been finding is that over time
(usually a
: > few days) the asp pages fail with the following errors
: >
: > HTTP 500.100 - Internal Server Error - ASP error
: > Internet Information Services
: > Error Type:
: > Microsoft OLE DB Provider for ODBC Drivers (0x80004005) [Microsoft][ODBC
: > Microsoft Access Driver] The database has been placed in a state by an
: > unknown user that prevents it from being opened or locked.
: > /dreamweaver/Work_Order_Querys/Query_El_notcomp_both_priority.asp, line
: 29
: > Page:
: > GET /dreamweaver/Work_Order_Querys/Query_El_notcomp_both_priority.asp
: >
: > OR
: >
: > HTTP 500.100 - Internal Server Error - ASP error
: > Internet Information Services
: > Error Type:
: > Provider (0x80004005) Unspecified error
: > /dreamweaver/Work_Order_Querys/Query_El_notcomp_SD_priority.asp, line 29
: > Page:
: > GET /dreamweaver/Work_Order_Querys/Query_El_notcomp_SD_priority.asp
: >
: > 995 of the errors are the last one.
: >
: > The internet guest account has full permissions to the directory that
: > contains the database. Page Timeout value is already set at 5000.
: >
: > line 29 is:
: > Query_All_Work_Orders.ActiveConnection = MM_Web_Work_Order_STRING
: >
: > Any ideas why this is happening? I read somewhere that you can?t allow
: > access to a db file through asp and MS Access at the same time?
: >
: > This is really getting frustrating, as I need to reboot the box every
: few
: > days.
: >
: > Any help would be greatly appreciated!
: >
: I've recently had exactly this problem. Some time when refreshed the error
: would go away.
: I found a solution at http://www.dotnetforums.net/t49752.html.
: Its an IIS setting thats causing it
:
: no need to give up dreamweaver just yet :)
: hope it works ok
: I P
:


  Return to Index