Problem connecting to database

Results 1 to 2 of 2

Thread: Problem connecting to database

  1. #1
    Join Date
    Dec 1969

    Default Problem connecting to database

    Ive set up a website on my own pc with PWS, using a connection string to connect to the access database. To publish the website, I need to use a different web server, but I&#039;m not sure on how I should edit the ASP code to make the new connection work..I think I need to use the server.MapPath statement, but I can&#039;t work out how - Ive tried what I think it should be (below) but I get the error: Microsoft OLE DB Provider for ODBC Drivers error &#039;80004005&#039; <BR><BR>[Microsoft][ODBC Microsoft Access Driver] &#039;(unknown)&#039; is not a valid path. Make sure that the path name is spelled correctly and that you are connected to the server on which the file resides. <BR><BR>/cc7sjo/ProdSearch.asp, line 17 <BR><BR>CODE:<BR> &#060;%<BR>(16) set rsCategory = Server.CreateObject("ADODB.Recordset")<BR>(17) rsCategory.ActiveConnection = "DRIVER={Microsoft Access Driver (*.mdb)};DBQ=Server.MapPath(cc7sjodata
    orfolk.mdb))"<BR>(18) rsCategory.Source = "SELECT CatID, CatName FROM ProdCat"<BR>(19) rsCategory.CursorType = 0<BR>(20) rsCategory.CursorLocation = 2<BR>(21) rsCategory.LockType = 3<BR>(22) rsCategory.Open<BR>(23) rsCategory_numRows = 0<BR>%&#062;

  2. #2
    Join Date
    Dec 1969

    Default RE: Problem connecting to database

    Why not get the specific path from your sysadmin and forget using the MapPath method?

Posting Permissions

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