Connecting to passworded Access DB


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 5 of 5

Thread: Connecting to passworded Access DB

  1. #1
    John L. Guest

    Connecting to passworded Access DB


    I want my ASP page to write data to a passworded Access database. This code
    works fine on my computer using Win 98SE and PWS. However, it does not work
    on my web site's server. The code used is:

    dim Conn
    DBName = "../folder1/data.mdb"
    set Conn = server.createobject("ADODB.Connection")
    ConnStr = "DRIVER={Microsoft Access Driver (*.mdb)};"
    ConnStr = ConnStr & "DBQ=" & server.mappath(DBName) & ";"
    ConnStr = ConnStr & "PWD=password;"
    Conn.open ConnStr

    Error message is:
    Microsoft OLE DB Provider for ODBC Drivers error '80004005'
    [Microsoft][ODBC Microsoft Access Driver] Not a valid password.
    /folder1/submit.asp, line 19

    Line 19 is the Conn.open ConnStr line.

    I have double checked and the password is correct, so there is something
    wrong with my Connection String. Any advice?

    Thanks, John L.


  2. #2
    Kris Eiben Guest

    Re: Connecting to passworded Access DB

    Username?

    John L. wrote in message <3a416118$1@news.devx.com>...
    >
    >I want my ASP page to write data to a passworded Access database. This code
    >works fine on my computer using Win 98SE and PWS. However, it does not work
    >on my web site's server. The code used is:
    >
    >dim Conn
    >DBName = "../folder1/data.mdb"
    >set Conn = server.createobject("ADODB.Connection")
    >ConnStr = "DRIVER={Microsoft Access Driver (*.mdb)};"
    >ConnStr = ConnStr & "DBQ=" & server.mappath(DBName) & ";"
    >ConnStr = ConnStr & "PWD=password;"
    >Conn.open ConnStr
    >
    >Error message is:
    >Microsoft OLE DB Provider for ODBC Drivers error '80004005'
    >[Microsoft][ODBC Microsoft Access Driver] Not a valid password.
    >/folder1/submit.asp, line 19
    >
    >Line 19 is the Conn.open ConnStr line.
    >
    >I have double checked and the password is correct, so there is something
    >wrong with my Connection String. Any advice?
    >
    >Thanks, John L.
    >




  3. #3
    John L. Guest

    Re: Connecting to passworded Access DB

    As far as I know there is not a username. This is simply a "database
    password" as opposed to the user and/or group permissisons/accounts. To open
    this database in Access or in Visual Basic I only have to enter the
    password. The folder where the database file sits on the server does not
    have a user name or password either. I am fairly new to ADO (I still use DAO
    most of the time)

    Kris Eiben <eibenkthisisforspammers@yahoo.com> wrote in message
    news:3a4208ae$1@news.devx.com...
    > Username?
    >
    > John L. wrote in message <3a416118$1@news.devx.com>...
    > >
    > >I want my ASP page to write data to a passworded Access database. This

    code
    > >works fine on my computer using Win 98SE and PWS. However, it does not

    work
    > >on my web site's server. The code used is:
    > >
    > >dim Conn
    > >DBName = "../folder1/data.mdb"
    > >set Conn = server.createobject("ADODB.Connection")
    > >ConnStr = "DRIVER={Microsoft Access Driver (*.mdb)};"
    > >ConnStr = ConnStr & "DBQ=" & server.mappath(DBName) & ";"
    > >ConnStr = ConnStr & "PWD=password;"
    > >Conn.open ConnStr
    > >
    > >Error message is:
    > >Microsoft OLE DB Provider for ODBC Drivers error '80004005'
    > >[Microsoft][ODBC Microsoft Access Driver] Not a valid password.
    > >/folder1/submit.asp, line 19
    > >
    > >Line 19 is the Conn.open ConnStr line.
    > >
    > >I have double checked and the password is correct, so there is something
    > >wrong with my Connection String. Any advice?
    > >
    > >Thanks, John L.
    > >

    >
    >




  4. #4
    Madhon Guest

    Re: Connecting to passworded Access DB

    the default username for an access db is "admin"

    "John L." <mynista@mynista.com> wrote in message
    news:3a421d94@news.devx.com...
    > As far as I know there is not a username. This is simply a "database
    > password" as opposed to the user and/or group permissisons/accounts. To

    open
    > this database in Access or in Visual Basic I only have to enter the
    > password. The folder where the database file sits on the server does not
    > have a user name or password either. I am fairly new to ADO (I still use

    DAO
    > most of the time)
    >
    > Kris Eiben <eibenkthisisforspammers@yahoo.com> wrote in message
    > news:3a4208ae$1@news.devx.com...
    > > Username?
    > >
    > > John L. wrote in message <3a416118$1@news.devx.com>...
    > > >
    > > >I want my ASP page to write data to a passworded Access database. This

    > code
    > > >works fine on my computer using Win 98SE and PWS. However, it does not

    > work
    > > >on my web site's server. The code used is:
    > > >
    > > >dim Conn
    > > >DBName = "../folder1/data.mdb"
    > > >set Conn = server.createobject("ADODB.Connection")
    > > >ConnStr = "DRIVER={Microsoft Access Driver (*.mdb)};"
    > > >ConnStr = ConnStr & "DBQ=" & server.mappath(DBName) & ";"
    > > >ConnStr = ConnStr & "PWD=password;"
    > > >Conn.open ConnStr
    > > >
    > > >Error message is:
    > > >Microsoft OLE DB Provider for ODBC Drivers error '80004005'
    > > >[Microsoft][ODBC Microsoft Access Driver] Not a valid password.
    > > >/folder1/submit.asp, line 19
    > > >
    > > >Line 19 is the Conn.open ConnStr line.
    > > >
    > > >I have double checked and the password is correct, so there is

    something
    > > >wrong with my Connection String. Any advice?
    > > >
    > > >Thanks, John L.
    > > >

    > >
    > >

    >
    >




  5. #5
    Francis Guest

    Re: Connecting to passworded Access DB


    Check out the MS Knowledge base...

    They have an answer for, some server use the ADO 2.5 whow not connect as
    ADO 2.0 or 2.1

    "John L." <mynista@mynista.com> wrote:
    >
    >I want my ASP page to write data to a passworded Access database. This code
    >works fine on my computer using Win 98SE and PWS. However, it does not work
    >on my web site's server. The code used is:
    >
    >dim Conn
    >DBName = "../folder1/data.mdb"
    >set Conn = server.createobject("ADODB.Connection")
    >ConnStr = "DRIVER={Microsoft Access Driver (*.mdb)};"
    >ConnStr = ConnStr & "DBQ=" & server.mappath(DBName) & ";"
    >ConnStr = ConnStr & "PWD=password;"
    >Conn.open ConnStr
    >
    >Error message is:
    >Microsoft OLE DB Provider for ODBC Drivers error '80004005'
    >[Microsoft][ODBC Microsoft Access Driver] Not a valid password.
    >/folder1/submit.asp, line 19
    >
    >Line 19 is the Conn.open ConnStr line.
    >
    >I have double checked and the password is correct, so there is something
    >wrong with my Connection String. Any advice?
    >
    >Thanks, John L.
    >



Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center