Access97 DB locks up the asp code at times

Discussion in 'ASP General' started by ziggs, Aug 8, 2004.

  1. ziggs

    ziggs Guest

    I have an Access 97 DB called employees.mdb within a NT security type
    folder. Other users have write privileges to this document to make
    updates. 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 user 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. Once this occurs, the
    employee.asp delivers an error code and complains about the connection
    line of "my_conn.Open ConnString".

    Any idea why this is happening? 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 users 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.

    Any thoughts?

    Thanks
    ziggs, Aug 8, 2004
    #1
    1. Advertising

  2. ziggs wrote:
    > I have an Access 97 DB called employees.mdb within a NT security type
    > folder. Other users have write privileges to this document to make
    > updates. 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")


    Nothing to do with your problem, but you should be using the native Jet
    OLEDB provider instead of the ODBC driver:

    ConnString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source="
    & Server.MapPath("employees.mdb")

    The ODBC provider has been deprecated.

    >
    > 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 user 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.


    What problem?

    > My only guess is that
    > someone accesses the employee.asp, which queries the Access DB when
    > the Access DB is opened and being changed. Once this occurs, the
    > employee.asp delivers an error code and complains about the connection
    > line of "my_conn.Open ConnString".


    What error code? What error message? You're asking us to solve your problem
    blindfolded.


    If I had to guess, and I do, I would guess that you have a permissions
    problem. All database users, including the IUSR_MachineName account, need
    filesystem read/write permissions on the folder containing the database
    file. Users must be able to create, modify and delete the .ldb locking file
    in the folder containing the database. It is not enough to grant permissions
    for the database file.

    Bob Barrows

    --
    Microsoft MVP - ASP/ASP.NET
    Please reply to the newsgroup. This email account is my spam trap so I
    don't check it very often. If you must reply off-line, then remove the
    "NO SPAM"
    Bob Barrows [MVP], Aug 8, 2004
    #2
    1. Advertising

  3. ziggs

    ziggs Guest

    Thanks for the quick reply.

    Almost all employees are set to read only, so I would assume that one
    of these users created the query off the asp and that's the problem.
    I'm not sure why, but I could never see the employee.ldb on the folder
    so I never could check that. Thus, it most likely is the permissions
    problem with the folder.

    From memory, to answer your questions that I neglected to detail out
    (sorry), the error message was:

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

    Thus, it was pointing to the line of:

    "my_conn.Open ConnString"

    that I was referring to but didn't detail out.

    I'll chat with our IT group about setting the proper permissions.
    Unfortunately, I haven't had much luck in the past describing what I
    actually need since I'm obviuosly weak in this area.

    If you have any specific advise I can pass on, I would appreciate it.
    The four current groups are Administrators, Everyone, Managers, and
    System under the Security tab. Your suggesting to add at least the
    IUSR_MachineName account name.

    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 not be able to open or view the folder off any share, Managers can
    open the share and change the mdb and Administrators obviously have
    full control to all.





    On Sun, 8 Aug 2004 14:05:30 -0400, "Bob Barrows [MVP]"
    <> wrote:

    >ziggs wrote:
    >> I have an Access 97 DB called employees.mdb within a NT security type
    >> folder. Other users have write privileges to this document to make
    >> updates. 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")

    >
    >Nothing to do with your problem, but you should be using the native Jet
    >OLEDB provider instead of the ODBC driver:
    >
    > ConnString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source="
    >& Server.MapPath("employees.mdb")
    >
    >The ODBC provider has been deprecated.
    >
    >>
    >> 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 user 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.

    >
    >What problem?
    >
    >> My only guess is that
    >> someone accesses the employee.asp, which queries the Access DB when
    >> the Access DB is opened and being changed. Once this occurs, the
    >> employee.asp delivers an error code and complains about the connection
    >> line of "my_conn.Open ConnString".

    >
    >What error code? What error message? You're asking us to solve your problem
    >blindfolded.
    >
    >
    >If I had to guess, and I do, I would guess that you have a permissions
    >problem. All database users, including the IUSR_MachineName account, need
    >filesystem read/write permissions on the folder containing the database
    >file. Users must be able to create, modify and delete the .ldb locking file
    >in the folder containing the database. It is not enough to grant permissions
    >for the database file.
    >
    >Bob Barrows
    ziggs, Aug 8, 2004
    #3
  4. ziggs

    joker Guest

    The .ldb file is created when the database is accessed & deleted after
    you have finished with the .mdb file.

    ziggs wrote:

    > Thanks for the quick reply.
    >
    > Almost all employees are set to read only, so I would assume that one
    > of these users created the query off the asp and that's the problem.
    > I'm not sure why, but I could never see the employee.ldb on the folder
    > so I never could check that. Thus, it most likely is the permissions
    > problem with the folder.
    >
    > From memory, to answer your questions that I neglected to detail out
    > (sorry), the error message was:
    >
    > Error Type: (0x80004005)
    > Unspecified error
    > employee.asp, line 6
    >
    > Thus, it was pointing to the line of:
    >
    > "my_conn.Open ConnString"
    >
    > that I was referring to but didn't detail out.
    >
    > I'll chat with our IT group about setting the proper permissions.
    > Unfortunately, I haven't had much luck in the past describing what I
    > actually need since I'm obviuosly weak in this area.
    >
    > If you have any specific advise I can pass on, I would appreciate it.
    > The four current groups are Administrators, Everyone, Managers, and
    > System under the Security tab. Your suggesting to add at least the
    > IUSR_MachineName account name.
    >
    > 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 not be able to open or view the folder off any share, Managers can
    > open the share and change the mdb and Administrators obviously have
    > full control to all.
    >
    >
    >
    >
    >
    > On Sun, 8 Aug 2004 14:05:30 -0400, "Bob Barrows [MVP]"
    > <> wrote:
    >
    >
    >>ziggs wrote:
    >>
    >>>I have an Access 97 DB called employees.mdb within a NT security type
    >>>folder. Other users have write privileges to this document to make
    >>>updates. 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")

    >>
    >>Nothing to do with your problem, but you should be using the native Jet
    >>OLEDB provider instead of the ODBC driver:
    >>
    >>ConnString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source="
    >>& Server.MapPath("employees.mdb")
    >>
    >>The ODBC provider has been deprecated.
    >>
    >>
    >>>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 user 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.

    >>
    >>What problem?
    >>
    >>
    >>>My only guess is that
    >>>someone accesses the employee.asp, which queries the Access DB when
    >>>the Access DB is opened and being changed. Once this occurs, the
    >>>employee.asp delivers an error code and complains about the connection
    >>>line of "my_conn.Open ConnString".

    >>
    >>What error code? What error message? You're asking us to solve your problem
    >>blindfolded.
    >>
    >>
    >>If I had to guess, and I do, I would guess that you have a permissions
    >>problem. All database users, including the IUSR_MachineName account, need
    >>filesystem read/write permissions on the folder containing the database
    >>file. Users must be able to create, modify and delete the .ldb locking file
    >>in the folder containing the database. It is not enough to grant permissions
    >>for the database file.
    >>
    >>Bob Barrows

    >
    >
    joker, Aug 9, 2004
    #4
  5. ziggs

    ziggs Guest

    Yes, I realize that, but thanks for responding. When I open the .mdb,
    I don't see the .ldb. I normally open the .ldb and it normally tells
    me which computer has it open. Unfortunately, I don't see the .ldb
    even when I have the .mdb open.




    On Mon, 09 Aug 2004 08:37:29 -0600, joker <> wrote:

    >The .ldb file is created when the database is accessed & deleted after
    >you have finished with the .mdb file.
    >
    >ziggs wrote:
    >
    >> Thanks for the quick reply.
    >>
    >> Almost all employees are set to read only, so I would assume that one
    >> of these users created the query off the asp and that's the problem.
    >> I'm not sure why, but I could never see the employee.ldb on the folder
    >> so I never could check that. Thus, it most likely is the permissions
    >> problem with the folder.
    >>
    >> From memory, to answer your questions that I neglected to detail out
    >> (sorry), the error message was:
    >>
    >> Error Type: (0x80004005)
    >> Unspecified error
    >> employee.asp, line 6
    >>
    >> Thus, it was pointing to the line of:
    >>
    >> "my_conn.Open ConnString"
    >>
    >> that I was referring to but didn't detail out.
    >>
    >> I'll chat with our IT group about setting the proper permissions.
    >> Unfortunately, I haven't had much luck in the past describing what I
    >> actually need since I'm obviuosly weak in this area.
    >>
    >> If you have any specific advise I can pass on, I would appreciate it.
    >> The four current groups are Administrators, Everyone, Managers, and
    >> System under the Security tab. Your suggesting to add at least the
    >> IUSR_MachineName account name.
    >>
    >> 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 not be able to open or view the folder off any share, Managers can
    >> open the share and change the mdb and Administrators obviously have
    >> full control to all.
    >>
    >>
    >>
    >>
    >>
    >> On Sun, 8 Aug 2004 14:05:30 -0400, "Bob Barrows [MVP]"
    >> <> wrote:
    >>
    >>
    >>>ziggs wrote:
    >>>
    >>>>I have an Access 97 DB called employees.mdb within a NT security type
    >>>>folder. Other users have write privileges to this document to make
    >>>>updates. 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")
    >>>
    >>>Nothing to do with your problem, but you should be using the native Jet
    >>>OLEDB provider instead of the ODBC driver:
    >>>
    >>>ConnString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source="
    >>>& Server.MapPath("employees.mdb")
    >>>
    >>>The ODBC provider has been deprecated.
    >>>
    >>>
    >>>>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 user 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.
    >>>
    >>>What problem?
    >>>
    >>>
    >>>>My only guess is that
    >>>>someone accesses the employee.asp, which queries the Access DB when
    >>>>the Access DB is opened and being changed. Once this occurs, the
    >>>>employee.asp delivers an error code and complains about the connection
    >>>>line of "my_conn.Open ConnString".
    >>>
    >>>What error code? What error message? You're asking us to solve your problem
    >>>blindfolded.
    >>>
    >>>
    >>>If I had to guess, and I do, I would guess that you have a permissions
    >>>problem. All database users, including the IUSR_MachineName account, need
    >>>filesystem read/write permissions on the folder containing the database
    >>>file. Users must be able to create, modify and delete the .ldb locking file
    >>>in the folder containing the database. It is not enough to grant permissions
    >>>for the database file.
    >>>
    >>>Bob Barrows

    >>
    >>
    ziggs, Aug 9, 2004
    #5
  6. That's the problem. Without the ldb file, multi-user activity is not
    possible. Users of the database must be granted filesystem permissions on
    the folder to enable them to create, modify and delete the ldb file when
    they open the mdb file.

    Bob Barrows
    ziggs wrote:
    > Yes, I realize that, but thanks for responding. When I open the .mdb,
    > I don't see the .ldb. I normally open the .ldb and it normally tells
    > me which computer has it open. Unfortunately, I don't see the .ldb
    > even when I have the .mdb open.
    >
    >
    >
    >
    > On Mon, 09 Aug 2004 08:37:29 -0600, joker <> wrote:
    >
    >> The .ldb file is created when the database is accessed & deleted
    >> after
    >> you have finished with the .mdb file.
    >>
    >> ziggs wrote:
    >>
    >>> Thanks for the quick reply.
    >>>
    >>> Almost all employees are set to read only, so I would assume that
    >>> one
    >>> of these users created the query off the asp and that's the problem.
    >>> I'm not sure why, but I could never see the employee.ldb on the
    >>> folder
    >>> so I never could check that. Thus, it most likely is the
    >>> permissions problem with the folder.
    >>>
    >>> From memory, to answer your questions that I neglected to detail out
    >>> (sorry), the error message was:
    >>>
    >>> Error Type: (0x80004005)
    >>> Unspecified error
    >>> employee.asp, line 6
    >>>
    >>> Thus, it was pointing to the line of:
    >>>
    >>> "my_conn.Open ConnString"
    >>>
    >>> that I was referring to but didn't detail out.
    >>>
    >>> I'll chat with our IT group about setting the proper permissions.
    >>> Unfortunately, I haven't had much luck in the past describing what I
    >>> actually need since I'm obviuosly weak in this area.
    >>>
    >>> If you have any specific advise I can pass on, I would appreciate
    >>> it.
    >>> The four current groups are Administrators, Everyone, Managers, and
    >>> System under the Security tab. Your suggesting to add at least the
    >>> IUSR_MachineName account name.
    >>>
    >>> 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 not be able to open or view the folder off any share, Managers
    >>> can
    >>> open the share and change the mdb and Administrators obviously have
    >>> full control to all.
    >>>
    >>>
    >>>
    >>>
    >>>
    >>> On Sun, 8 Aug 2004 14:05:30 -0400, "Bob Barrows [MVP]"
    >>> <> wrote:
    >>>
    >>>
    >>>> ziggs wrote:
    >>>>
    >>>>> I have an Access 97 DB called employees.mdb within a NT security
    >>>>> type folder. Other users have write privileges to this document
    >>>>> to make updates. 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")
    >>>>
    >>>> Nothing to do with your problem, but you should be using the
    >>>> native Jet OLEDB provider instead of the ODBC driver:
    >>>>
    >>>> ConnString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source="
    >>>> & Server.MapPath("employees.mdb")
    >>>>
    >>>> The ODBC provider has been deprecated.
    >>>>
    >>>>
    >>>>> 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 user 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.
    >>>>
    >>>> What problem?
    >>>>
    >>>>
    >>>>> My only guess is that
    >>>>> someone accesses the employee.asp, which queries the Access DB
    >>>>> when
    >>>>> the Access DB is opened and being changed. Once this occurs, the
    >>>>> employee.asp delivers an error code and complains about the
    >>>>> connection line of "my_conn.Open ConnString".
    >>>>
    >>>> What error code? What error message? You're asking us to solve
    >>>> your problem blindfolded.
    >>>>
    >>>>
    >>>> If I had to guess, and I do, I would guess that you have a
    >>>> permissions problem. All database users, including the
    >>>> IUSR_MachineName account, need filesystem read/write permissions
    >>>> on the folder containing the database file. Users must be able to
    >>>> create, modify and delete the .ldb locking file in the folder
    >>>> containing the database. It is not enough to grant permissions for
    >>>> the database file.
    >>>>
    >>>> Bob Barrows


    --
    Microsoft MVP -- ASP/ASP.NET
    Please reply to the newsgroup. The email account listed in my From
    header is my spam trap, so I don't check it very often. You will get a
    quicker response by posting to the newsgroup.
    Bob Barrows [MVP], Aug 9, 2004
    #6
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. =?Utf-8?B?bWF2cmlja18xMDE=?=

    SetAuthCookie works some times and fails some times?

    =?Utf-8?B?bWF2cmlja18xMDE=?=, Mar 23, 2006, in forum: ASP .Net
    Replies:
    0
    Views:
    497
    =?Utf-8?B?bWF2cmlja18xMDE=?=
    Mar 23, 2006
  2. =?Utf-8?B?bWF2cmlja18xMDE=?=

    Forms Authentication Fails some times and not some times???

    =?Utf-8?B?bWF2cmlja18xMDE=?=, Mar 28, 2006, in forum: ASP .Net
    Replies:
    0
    Views:
    480
    =?Utf-8?B?bWF2cmlja18xMDE=?=
    Mar 28, 2006
  3. djskrill
    Replies:
    9
    Views:
    686
    djskrill
    Oct 1, 2003
  4. v.davis2

    DAO and Access97 WHERE clause fails

    v.davis2, Jun 9, 2007, in forum: Python
    Replies:
    5
    Views:
    846
    stefaan
    Jun 10, 2007
  5. Peng Yu
    Replies:
    17
    Views:
    670
    Peng Yu
    Sep 14, 2008
Loading...

Share This Page