CFF KB - Carrz-Fox-Fire Promotions Knowledge Base

CFF KB is all about 1 thing: The Sharing of Knowledge and the Power we gain from it.
  • Breadrumbs:
  • Microsoft JET Database Engine (0x80004005) is not a valid path

  • CFF Knowledge Base - Share With Facebook CFF Knowledge Base - Share on Twitter CFF Knowledge Base - Share on Reddit CFF Knowledge Base - Share on Digg It CFF Knowledge Base - Share on Stumble Upon It CFF Knowledge Base - Share on Delicious
    Share With Friends (Updated 6-8-2010)
  • Article ID:
    58
  • Date Created
    Tuesday, November 30, 2010
  • Last Updated
    Tuesday, November 30, 2010
  • This Article Has been Viewed
    2743 times
  • Short Desc
    When creating a database connection string, you may sometimes get the address incorrect.
  • Details
    Creating a JET Database Connection String, you have to make sure that you have your address correct, if not, you will get an error similar to this:

     
    Microsoft JET Database Engine (0x80004005)
    'G:\InetPub\wwwroot\site\2\data\mydb.mdb' 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.
    /stajac/ACN.asp, line 6
  • Recreate Issue
    This will happen if you misspell your directory name in the path.
    Example

    <%
    Set objConn = Server.CreateObject("ADODB.Connection")
    objConn.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=G:\InetPub\wwwroot\site\2\data\mydb.mdb"
    objConn.Open
    %>
  • Resolve Issue
    To resolve this issue, make sure that you spell your folder names correctly.
    Example

    <%
    Set objConn = Server.CreateObject("ADODB.Connection")
    objConn.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=G:\InetPub\wwwroot\site\1\data\mydb.mdb"
    objConn.Open
    %>


    Looking at the above connection path, you will notice that there is a \1\ instead of a \2\ this is what caused the issue.

    When creating paths like the one above, copy and paste the physical path from Explorer's address bar.