> Dim objConn As New OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;
> Data Source=" & Server.MapPath("../../WebDBs/websitex/
[quoted text clipped - 3 lines]
> And I got this error: Cannot use a leading .. to exit above the top
> directory.
Yes, that would be correct. There are several tricks you could do to resolve
virtual and relative directories to absolute filespecs, but by far the
simplest solution is to specify the full path to your Jet database in the
connection string, as I demonstrated.
> Then after some research I read someone advising to use a DSN for data
> bases outside our website folder.
Can't imagine why anyone would have said that...
> So, I want to access myDatase.mdb from default.aspx. How can I make
> the db folder visible to my website in a secure way? Any sugestion?
Dim objConn As New OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0; Data
Source=D:\webdbs\website\myDatabase.mdb;"))
You may need to specify other parameters in your connection string...
Finally, the user account that ASP.NET is running under will need to have
write permission on the D:\webdbs\website folder.

Signature
Mark Rae
ASP.NET MVP
http://www.markrae.net
joaotsetsemoita@gmail.com - 24 Jul 2007 14:55 GMT
Just to let you know that problem is solved using the full path
solution.
I also found another way, probably one of the several tricks you said.
System.IO.FileInfo(System.IO.Path.Combine(Server.MapPath("."),
"../../../WebDBs/websitex/mydatabase.mdb")).FullName.
One way or another it's working
Many thanks for your help.
Joao
> <joaotsetsemo...@gmail.com> wrote in message
>
[quoted text clipped - 32 lines]
> Mark Rae
> ASP.NET MVPhttp://www.markrae.net