Results 1 to 3 of 3

Thread: ConnectionString

  1. #1
    Join Date
    Dec 1969

    Default ConnectionString

    I have asked this question today on one of the other message boards. Sorry for the repetition. I am an individual trying to implement database connectivity using MSAccess 2000 and ASP on a server running MS NT. The ISP has been no help. All of the sample code shows the directory for a dsnless connection to point to c:inetpubwwwroot... and so on. Everything works locally, but when I upload, the database connection is not made. I think the problem is in the path in my ConnectionString. I have had a few short suggestions, but with no success. Here is the code I am using:<BR><BR>objConn.ConnectionString = "DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=http:/"<BR> <BR>Am I supposed to use the url of my database, or the actual physical location of the database on the server? If the second is true, how do I know where that is since I am simply FTPing to the server? <BR><BR>Please include an email if you are able so I can email back and forth to fix this. I will be forever grateful!!!<BR>

  2. #2
    Join Date
    Dec 1969

    Default RE: ConnectionString

    it should be the physical location of the file on the server. you can use Server.MapPath for this purpose, eliminating the need to know precisely what the path is. just use the virtual path, then concatenate it into the connectionstring<BR><BR>dbPath = Server.MapPath("/folder/file.mdb")<BR>connectionstring = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & dbPath & ";"<BR><BR>note I used OLEDB instead of ODBC, since it&#039s quicker<BR><BR>j

  3. #3
    lm Guest

    Default Thank You

    I thank you very much. Now I have another avenue to investigate!

Posting Permissions

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