Results 1 to 3 of 3

Thread: Server.Mappath

  1. #1
    Join Date
    Dec 1969

    Default Server.Mappath

    Could someone tell me the easiest way of finding my direct path to this url on my host:<BR><BR>MyConn.Open "FILEDSN=C:dsnMyTable_dsn.dsn)"<BR><BR>Is there a way to do the mappath command with this syntax? Or do I have some other alternative?<BR><BR>Thanks,<BR><BR>Bob

  2. #2
    Join Date
    Dec 1969

    Default Don't understand the question...

    ...if you know that the file is where you just showed, why do you need or want MapPath????<BR><BR>

  3. #3
    coopetj Guest

    Default RE: Server.Mappath

    I am using the following to connect<BR><BR>dim conn, DSNtemp, RS, StrQ, I, newsRec<BR><BR>&#039;Connect to DB<BR>set conn = server.createobject("adodb.connection")<BR>DSNtemp ="DRIVER={Microsoft Access Driver (*.mdb)}; "<BR>DSNtemp=dsntemp & "DBQ=" & server.mappath("../dbWeb/dbNews.mdb")<BR>conn.Open DSNtemp<BR><BR>So depending on where your script is located you would change the path accordingly. In this case my db is located one directory up from my script (..) and in the folder dbWeb (/dbweb) and is called dbNews.mdb.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts