Error in Connect Access Database

Discussion in 'ASP General' started by Thomas Tsang, Jun 6, 2005.

  1. Thomas Tsang

    Thomas Tsang Guest

    I am using ASP + IIS + MS access, when running the
    following codes:

    set Conn=Server.CREATEOBJECT("ADODB.CONNECTION")
    conn.open "DRIVER={Microsoft Access Driver
    (*.mdb)}; " & Server.MapPath("db.mdb")

    The following erorr is show:
    General error Unable to open registry key
    'Temporary (volatile) Jet DSN for process 0x508
    Thread 0x634 DBC 0x2181024 Jet'.

    I have shared the MS knowledge base and try to
    grant the modify Permissions to IUSR_SERVER on the
    folder that holding the database, and set the
    script authority in IIS, the error is still exist.
    If I create a system DNS for that Access file and
    modify the second code as

    conn.Open "AKmobile"

    Another error is show:
    [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.

    But there is no problem when conencting with MS
    SQL Server.

    Please help. Thnak a lot.
     
    Thomas Tsang, Jun 6, 2005
    #1
    1. Advertising

  2. Thomas Tsang wrote:
    > I am using ASP + IIS + MS access, when running the
    > following codes:
    >
    > set Conn=Server.CREATEOBJECT("ADODB.CONNECTION")
    > conn.open "DRIVER={Microsoft Access Driver
    > (*.mdb)}; " & Server.MapPath("db.mdb")
    >

    Change your connection string to :

    dim sConnect
    sConnect = "Provider=microsoft.jet.oledb.4.0;" & _
    "Data Source=" & Server.MapPath("db.mdb")
    conn.open sConnect

    The native OLEDB provider needs no access to the Registry. Using the
    obsolete ODBC driver can lead to this error.

    > The following erorr is show:
    > General error Unable to open registry key
    > 'Temporary (volatile) Jet DSN for process 0x508
    > Thread 0x634 DBC 0x2181024 Jet'.
    >
    >
    > Another error is show:
    > [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.
    >


    The IUSR account needs read/write permissions for the FOLDER containing the
    database, not just the database. All database users must be able to create,
    modify and delete the locking file (db.ldb) in order for multiuser activity
    to be allowed.

    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], Jun 6, 2005
    #2
    1. Advertising

  3. Thomas Tsang

    Thomas Tsang Guest

    Thank you for your information, but 'Unspecified
    error' is show when using
    sConnect = "Provider=microsoft.jet.oledb.4.0;" &
    "Data Source=" & Server.MapPath("db.mdb")
    conn.open sConnect

    And in fact I have already grant the full control
    authority to the IUSR on the folder containing the
    Access database, but still failure....


    "Bob Barrows [MVP]" <> ¦b
    ¶l¥ó news:%
    ¤¤¼¶¼g...
    > Thomas Tsang wrote:
    > > I am using ASP + IIS + MS access, when running

    the
    > > following codes:
    > >
    > > set

    Conn=Server.CREATEOBJECT("ADODB.CONNECTION")
    > > conn.open "DRIVER={Microsoft Access Driver
    > > (*.mdb)}; " & Server.MapPath("db.mdb")
    > >

    > Change your connection string to :
    >
    > dim sConnect
    > sConnect = "Provider=microsoft.jet.oledb.4.0;" &

    _
    > "Data Source=" & Server.MapPath("db.mdb")
    > conn.open sConnect
    >
    > The native OLEDB provider needs no access to the

    Registry. Using the
    > obsolete ODBC driver can lead to this error.
    >
    > > The following erorr is show:
    > > General error Unable to open registry key
    > > 'Temporary (volatile) Jet DSN for process

    0x508
    > > Thread 0x634 DBC 0x2181024 Jet'.
    > >
    > >
    > > Another error is show:
    > > [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.
    > >

    >
    > The IUSR account needs read/write permissions

    for the FOLDER containing the
    > database, not just the database. All database

    users must be able to create,
    > modify and delete the locking file (db.ldb) in

    order for multiuser activity
    > to be allowed.
    >
    > 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"
    >
    >
     
    Thomas Tsang, Jun 6, 2005
    #3
  4. Thomas Tsang wrote:
    > Thank you for your information, but 'Unspecified
    > error' is show when using
    > sConnect = "Provider=microsoft.jet.oledb.4.0;" &
    > "Data Source=" & Server.MapPath("db.mdb")
    > conn.open sConnect
    >

    You need to reinstall or install a later version of MDAC. Go to
    msdn.microsoft.com and search for the latest MDAC.

    Be sure to download and install the Jet components which are not included
    with the MDAC installation.

    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], Jun 6, 2005
    #4
    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. SSP
    Replies:
    1
    Views:
    3,046
    Jeff Cochran
    Jul 1, 2003
  2. Patricia Kline
    Replies:
    1
    Views:
    593
    Oliver
    Oct 25, 2003
  3. buzz
    Replies:
    2
    Views:
    9,424
    =?Utf-8?B?U2hhaWxlc2g=?=
    Jul 13, 2005
  4. CM Manager via DotNetMonster.com

    Unable to start application to connect to Access database

    CM Manager via DotNetMonster.com, Aug 17, 2005, in forum: ASP .Net
    Replies:
    2
    Views:
    665
    Paul Clement
    Aug 18, 2005
  5. Replies:
    2
    Views:
    330
Loading...

Share This Page