Can't connect my Access DB on the WEB

Results 1 to 2 of 2

Thread: Can't connect my Access DB on the WEB

  1. #1
    Join Date
    Dec 1969

    Default Can't connect my Access DB on the WEB

    Please help! My web host says that this is their server path<BR>d:webpeterson<BR><BR>my DB is at<BR>public_html/db/database.mdb<BR><BR>I&#039ve tried many variations of the following code...<BR><BR>"Provider=Microsoft.Jet.OLEDB.4.0;" & _<BR> "Data Source=d:webpetersonpublic_htmldbCollectiblesData. mdb;" & _<BR><BR>"Persist Security Info=False"<BR><BR>The site works fine using PWS on my local machine, I just don&#039t know the syntax for accessing the DB. I&#039m using ASP and Access 2000 database. As you can tell Im a bit of a newbie with asp...<BR><BR>Thanks for any help! <BR>

  2. #2
    Join Date
    Dec 1969

    Default RE: Can't connect my Access DB on the WEB

    If you are going to be doing updates to your database via ASP pages you will need to have write permissions on the directory that the database is in.<BR><BR>Dim Conn<BR>Dim ConnStr<BR><BR>Set Conn = Server.CreateObject("ADODB.Connection")<BR><BR>if your database is in your cgi-bin which is the directory that your ISP will probably give write permission to the connection string below will work on pages that are in your root directory<BR><BR>ConnStr = "DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=" & Server.MapPath("./cgi-bin/databasename.mdb")<BR><BR>&#039Check the connection string<BR>&#039comment response.write lines out later<BR>response.write ConnStr <BR>response.end<BR><BR>Conn.Open connStr<BR>

Posting Permissions

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