Re: ASP.NET OleDbConnection - Databases

Discussion in 'HTML' started by Dan, Jun 23, 2003.

  1. Dan

    Dan Guest

    > I am trying
    >
    > dbStr = Server.MapPath("../TestDatabase.mdb")
    > Response.write("db string " & dbStr)


    do a response.write(server.mappath("test.asp")) then that will show you the
    full path. Use that path to find the path to your db. For example if it
    returns something like "d:/users/blah/html/test.asp" then you could change
    it to "d:/users/database/db.mdb" and set your db string to this directly.
    Dan, Jun 23, 2003
    #1
    1. Advertising

  2. Dan

    spaghetti Guest

    "trevor oakley" <> wrote in message
    news:wnGJa.322$...
    > Dan, I tried this early on, but I do not understand why it returns my hard
    > disk directory when I am using a Web server. I expected something

    referring
    > to the Web server.


    No, mappath returns the "physical location" ... that is how things look to
    your *harddrive*... not your web paths.

    >
    > Also, my book only uses examples referring to hard disk directories.




    Try microsoft.public.inetserver.asp.general on msnews.microsoft.com.
    spaghetti, Jun 23, 2003
    #2
    1. Advertising

  3. Dan, I tried this early on, but I do not understand why it returns my hard
    disk directory when I am using a Web server. I expected something referring
    to the Web server.

    Also, my book only uses examples referring to hard disk directories.

    Trevor

    "Dan" <> wrote in message
    news:rxCJa.8739$...
    > > I am trying
    > >
    > > dbStr = Server.MapPath("../TestDatabase.mdb")
    > > Response.write("db string " & dbStr)

    >
    > do a response.write(server.mappath("test.asp")) then that will show you

    the
    > full path. Use that path to find the path to your db. For example if it
    > returns something like "d:/users/blah/html/test.asp" then you could change
    > it to "d:/users/database/db.mdb" and set your db string to this directly.
    >
    >
    >
    >
    trevor oakley, Jun 23, 2003
    #3
    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:
    0
    Views:
    1,306
    vMike
    Jun 24, 2003
  2. vMike

    Re: ASP.NET and OleDbConnection

    vMike, Jun 24, 2003, in forum: ASP .Net
    Replies:
    2
    Views:
    2,248
    rajeshseetharam
    Jun 6, 2005
  3. Roger Cantillo

    oleDBConnection not recognizing Database

    Roger Cantillo, Aug 28, 2003, in forum: ASP .Net
    Replies:
    2
    Views:
    2,991
    Kevin Spencer
    Aug 28, 2003
  4. Steven K

    OleDbConnection: ASP vs ASP .Net

    Steven K, Mar 4, 2004, in forum: ASP .Net
    Replies:
    2
    Views:
    4,277
    Kevin Spencer
    Mar 4, 2004
  5. Ken North
    Replies:
    0
    Views:
    587
    Ken North
    Jul 14, 2005
Loading...

Share This Page