Re: ASP.NET and OleDbConnection
Also make sure that aspnet has permissions on the folder and db file
"trevor oakley" <firstname.lastname@example.org> wrote in message
> This is a repost, after people said this group is the suitable for ASP.NET
> 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
> 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
> 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.