Velocity Reviews

Velocity Reviews (http://www.velocityreviews.com/forums/index.php)
-   ASP .Net (http://www.velocityreviews.com/forums/f29-asp-net.html)
-   -   Re: ASP.NET and OleDbConnection (http://www.velocityreviews.com/forums/t58071-re-asp-net-and-oledbconnection.html)

vMike 06-24-2003 03:56 PM

Re: ASP.NET and OleDbConnection
 
Also make sure that aspnet has permissions on the folder and db file

"trevor oakley" <to006e7245@blueyonder.co.uk> wrote in message
news:CMNJa.565$5E.395@news-binary.blueyonder.co.uk...
> This is a repost, after people said this group is the suitable for ASP.NET
> comments.
>
>
> I am working through Teach Yourself ASP.NET in 21 Days (Day10), and I
> have hit a problem with OleDbConnection. Maybe someone here knows a
> lot of connections to databases in ASP.NET, and is willing to share
> their knowledge.
>
> I am trying
>
> dbStr = Server.MapPath("../TestDatabase.mdb")
> Response.write("db string " & dbStr)
>
> objConnection = New
> OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0; " _
> & " Data Source=" & dbStr & ";")
>
> but it fails, with an error on the path (cannot exit above top
> directory).
>
> The actual databases at hostway.com are stored above www so that they
> cannot be hacked using a browser. But the path seems to expect the
> root directory as seen by the browser. It works it I take out the ../
> and move my database to the www directory.
>
> Directory structure seen at FTP logon
>
> www --> alias to browser accessible pages, eg www.domain.com
> Database --> cannot be viewed from a browser, to stop hacking
> Logs
>
> All this works with Server.CreateObject in ASP.
>
> Can anyone help?
>
>
>





All times are GMT. The time now is 11:20 AM.

Powered by vBulletin®. Copyright ©2000 - 2014, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.