Which type of connection should I use?

Results 1 to 2 of 2

Thread: Which type of connection should I use?

  1. #1
    PJ Guest

    Default Which type of connection should I use?

    I ran into a little problem. I built a little ad rotator program and was using Mappath to make a SQL Server connection. I guess this has always been just fine because the db is always in the same location. <BR><BR>Now I converted the program to use an Access database that is buried in one of my web folders. Without foresight I just made small changes to make the connection point to the Access db, still using Mappath. <BR><BR>What happens now is that all the web pages throughout the site are all looking for a virtual reference to a database that is only valid if that page is in a very specific location.<BR><BR>Here is my connection:<BR>conn="DRIVER={Microsoft Access Driver (*.mdb)};DBQ="&Server.Mappath("AdLog.mdb")<BR><BR> A page in the same folder as this db will communicate fine. Any page away from this folder will not make the read.<BR><BR>So the simple question is, which type of connection do you recommend I use to replace the Mappath method, presuming I do not know the physical path from the root of the machine?<BR><BR>Thanks for any insight<BR><BR>PJ

  2. #2
    Join Date
    Dec 1969

    Default RE: Which type of connection should I use?

    I usually connect with a dsn.

Posting Permissions

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