Unpsecified Error with ODBC Connections

Discussion in 'ASP General' started by David Lozzi, Sep 12, 2003.

  1. David Lozzi

    David Lozzi Guest

    This happens a lot to my databases. I store them at the root of my
    developing files, i.e. c:\My Projects\Proj1\database.mdb. Randomly, the
    security settings on this database will drop to the basic secutiry, myself
    and SYSTEM. I need IUSR on it so I can access it through my ASP pages... I
    get errors like this:

    Microsoft OLE DB Provider for ODBC Drivers (0x80004005)
    [Microsoft][ODBC Microsoft Access Driver] The Microsoft Jet database engine
    cannot open the file '(unknown)'. It is already opened exclusively by
    another user, or you need permission to view its data.
    /amr/common/adovbs.inc, line 4

    and

    Provider (0x80004005)
    Unspecified error
    /amr/common/adovbs.inc, line 4

    and line 4 is this

    2 Dim Connect
    3 Set Connect = Server.CreateObject("ADODB.Connection")
    4 Connect.Open "dsn name"

    I will reset the permissions, then the ASP script will access the database
    once, like read or write, then this will happen again. I have to reset the
    permissions on the database file. Sometimes i'll have to do this 3 or 4
    times until the permissions stick. It only happens on a few of my projects,
    not all of them. Also, what helps at times, is within IIS, to check server
    extensions. This seems to do something to it to help it to work.

    Any Ideas?

    --
    David Lozzi
    Associated Business & Technology Group
    www.associatedbtg.com

    I should've known that....but I had a brain fart.
    David Lozzi, Sep 12, 2003
    #1
    1. Advertising

  2. David Lozzi

    Bob Barrows Guest

    This can happen when you compact the databases: the security settings for
    IUSR can be lost.

    FWIW, you should stop using ODBC and swtich to using the native Jet OLEDB
    provider instead. See www.connectionstrings.com. The MSDASQL provider (the
    provider used for ODBC drivers) has been deprecated by MS, and is not
    recommended to be used. Granted, that won't fix this particular problem, but
    ....

    HTH,
    Bob Barrows

    ..David Lozzi wrote:
    > This happens a lot to my databases. I store them at the root of my
    > developing files, i.e. c:\My Projects\Proj1\database.mdb. Randomly,
    > the security settings on this database will drop to the basic
    > secutiry, myself and SYSTEM. I need IUSR on it so I can access it
    > through my ASP pages... I get errors like this:
    >
    > Microsoft OLE DB Provider for ODBC Drivers (0x80004005)
    > [Microsoft][ODBC Microsoft Access Driver] The Microsoft Jet database
    > engine cannot open the file '(unknown)'. It is already opened
    > exclusively by another user, or you need permission to view its data.
    > /amr/common/adovbs.inc, line 4
    >
    > and
    >
    > Provider (0x80004005)
    > Unspecified error
    > /amr/common/adovbs.inc, line 4
    >
    > and line 4 is this
    >
    > 2 Dim Connect
    > 3 Set Connect = Server.CreateObject("ADODB.Connection")
    > 4 Connect.Open "dsn name"
    >
    > I will reset the permissions, then the ASP script will access the
    > database once, like read or write, then this will happen again. I
    > have to reset the permissions on the database file. Sometimes i'll
    > have to do this 3 or 4 times until the permissions stick. It only
    > happens on a few of my projects, not all of them. Also, what helps at
    > times, is within IIS, to check server extensions. This seems to do
    > something to it to help it to work.
    >
    > Any Ideas?
    Bob Barrows, Sep 12, 2003
    #2
    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. Robert Nurse

    ODBC Bridge Connections From JSP Help

    Robert Nurse, Nov 11, 2003, in forum: Java
    Replies:
    0
    Views:
    804
    Robert Nurse
    Nov 11, 2003
  2. jobs
    Replies:
    2
    Views:
    876
  3. Bill

    Long distance ODBC connections

    Bill, Aug 21, 2003, in forum: ASP General
    Replies:
    0
    Views:
    104
  4. Wes Gamble
    Replies:
    1
    Views:
    152
    Gerardo Santana Gómez Garrido
    Apr 5, 2006
  5. Anne Burgess
    Replies:
    3
    Views:
    107
    Anne Burgess
    Dec 21, 2007
Loading...

Share This Page