Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Access97 DB locks up the asp code at times

Status
Not open for further replies.

ziggs

Technical User
Sep 21, 2000
195
US
I have an Access 97 DB called employees.mdb within a NT security type folder. Most users only have read access (Everyone to read only in Security settings of folder). Other users have write privileges to this document to make updates (Managers to change in Security settings of folder). This Access DB is only used for an ASP called employee.asp that's within the same folder. Here's the connection string example:

<%@ Language=VBScript %>
<% Dim my_conn, rs

ConnString = "DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=" & Server.MapPath("employees.mdb")

Set my_conn = Server.CreateObject("ADODB.Connection")
my_conn.Open ConnString

set rs = server.CreateObject("ADODB.Recordset") %>

This asp has been working without major problems for about 2 years. On most occasions, a Manager can open the Access DB, make changes and close it without any problems. However, on two occasions, a problem has occurred after a user opened the Access DB. My only guess is that someone accesses the employee.asp, which queries the Access DB when the Access DB is opened and being changed and since they only have read access it freezes. Once this occurs, the employee.asp delivers an error code of:

Error Type: (0x80004005)
Unspecified error
employee.asp, line 6

Here's the code:

<%@ Language=VBScript %>
<% Dim my_conn, rs

ConnString = "DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=" & Server.MapPath("employees.mdb")

Set my_conn = Server.CreateObject("ADODB.Connection")
my_conn.Open ConnString

set rs = server.CreateObject("ADODB.Recordset") %>

The error is pointing to line 6, which is:

my_conn.Open ConnString

To correct the problem, I can just rename the employees.mdb to another name like employees1.mdb and then change connection string in the employee.asp to "ConnString = "DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=" & Server.MapPath("employees1.mdb")", from employees.mdb

Anyway, I would like the Managers to still have the ability to be able to modify the MS Access DB if possible so that I don't have yet another thing to do.

Am I correct in thinking it's a security folder setting problem? Also, any idea what the best settings would be?

The four current groups are Administrators, Everyone, Managers, and System under the Security tab.

I guess my main problem is that I'm not positive about the correct combination settings to use for the web sharing, sharing and security areas. My goal is that everyone can run the asp that accesses the mdb but they should not be able to open or view the folder off any share. Also, Managers should be able to open the employee.mdb and be able to change the employee.mdb. Administrators should obviously have full control to all.

Thanks
 
thing is if the managers are editing something, and someone hits the page, does the page make any updates?

personally i feel if the database is being used as a datasource it should not be opened.. so make a management page so the managers acan edit from a web page.. OR make a NEW db for managers with LINKED tables to the other DB that way they are not opening the original, and then just using it as a data source just like the web pages are, then the changes are in place when they are done, and the web pages wont fault out.


[thumbsup2]DreX
aKa - Robert
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top