Re: ASP.NET and OleDbConnection

Discussion in 'ASP .Net' started by vMike, Jun 24, 2003.

  1. vMike

    vMike Guest

    Also make sure that aspnet has permissions on the folder and db file

    "trevor oakley" <> wrote in message
    news:CMNJa.565$...
    > 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?
    >
    >
    >
     
    vMike, Jun 24, 2003
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. vMike

    Re: ASP.NET and OleDbConnection

    vMike, Jun 24, 2003, in forum: ASP .Net
    Replies:
    2
    Views:
    2,274
    rajeshseetharam
    Jun 6, 2005
  2. Keith
    Replies:
    1
    Views:
    473
    alex bowers
    Dec 11, 2003
  3. Steven K

    OleDbConnection: ASP vs ASP .Net

    Steven K, Mar 4, 2004, in forum: ASP .Net
    Replies:
    2
    Views:
    4,323
    Kevin Spencer
    Mar 4, 2004
  4. mtcc
    Replies:
    2
    Views:
    997
    Derek Harmon
    Oct 2, 2005
  5. Dan
    Replies:
    2
    Views:
    1,859
    trevor oakley
    Jun 23, 2003
Loading...

Share This Page