• Plesk Uservoice will be deprecated by October. Moving forward, all product feature requests and improvement suggestions will be managed through our new platform Plesk Productboard.
    To continue sharing your ideas and feedback, please visit features.plesk.com

ACCESS DSN problems

D

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

Thanks!!

Diego
.
 
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.
 
Back
Top