1. Please take a little time for this simple survey! Thank you for participating!
    Dismiss Notice
  2. Dear Pleskians, please read this carefully! New attachments and other rules Thank you!
    Dismiss Notice
  3. Dear Pleskians, I really hope that you will share your opinion in this Special topic for chatter about Plesk in the Clouds. Thank you!
    Dismiss Notice

ACCESS DSN problems

Discussion in 'Plesk for Windows - 8.x and Older' started by dsojo, Apr 23, 2004.

  1. dsojo

    dsojo Guest

    Hi there

    Does anyone now how to make work a database up the httpdocs directory like "httpdocs\db\mega.mdb"

    If i try to access it i got an error, then i look it up on the logs of the iis and it says that the server map goes to

    c:\inetpub\vhosts\default\db\mega.mdb ???????

    And on my asp conection string i put this.

    conn.Open = "Provider=Microsoft.Jet.OLEDB.4.0; Data Source=" & Server.MapPath("/db/mega.mdb")
    ' conn.Open("DSN=MEGA-48")

    and i create a dsn pointing to the dir

    I don't know what to doo, the only thing is that if i put it on the root of the site..it works perfectly but i need to fix it coz my clients don;t want to put the db on the home dir ...so anyone can download it....


  2. maarten

    maarten Guest

    When you want to know the real path to the database file. Run this script in the directory of the database:

    Just put it in a example.asp (or something like that)
    Response.Write Server.MapPath(Request.ServerVariables("PATH_INFO"))
    this line shows the real path to the databasefile.

    View this example on: http://mappath.denit.net

    You can add this path it in the plesk control panel under odbc. Test the connection et voila.

    Do not forget to set write permissions on the database file.
  3. jruzvidzo

    jruzvidzo Guest