Not a valid path?

Posted on 2006-04-03
Last Modified: 2013-11-24
I get the error message:
"Microsoft JET Database Engine (0x80004005)
'c:\inetpub\wwwroot\company\KUND.DBF' 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.
/company/test.asp, line 5"

The asp file is in the same folder as the dbf-file. This is my code:

  Dim Conn: Set Conn = CreateObject("ADODB.Connection")
  Conn.Open "Provider=Microsoft.Jet.OLEDB.4.0;" & _
                   "Data Source=" & Server.MapPath("KUND.DBF") & ";" & _
                   "Extended Properties=""DBASE IV;"";"
  Set OpenDBFConn = Conn

Set rs = Server.CreateObject("adodb.recordset")

SQL = "SELECT * From kund" SQL,Conn,2,3


Could any one tell me why I get this error?
Question by:torbjornfahlen
    LVL 52

    Accepted Solution

    In all the samples I have seen the actual datafile name is not specified. Have you tried:

        "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & Server.MapPath(".") & ";Extended Properties=dBASE IV;User ID=Admin;Password="

    Author Comment

    Thank you!!!

    That was strange, but it worked. =)
    LVL 52

    Expert Comment

    by:Carl Tawn
    No problem. For future reference, if you ever need a connection string for pretty much any database, you can look here:

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Highfive + Dolby Voice = No More Audio Complaints!

    Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

    Many companies are making the switch from Microsoft to Google Apps ( Use this article to learn more about what Google Apps has to offer and to help if you’re planning on migrating to Google Apps. It is …
    User Beware!  This is a rather permanent solution to removing your email from an exchange server.  The only way to truly go back is to have your exchange administrator restore your mailbox from backups.  This is usually the option of last resort.  A…
    The viewer will learn how to use the =DISCRINV command to create a discrete random variable, use this command to model a set of probabilities and outcomes in a Monte Carlo simulation, and learn how to find the standard deviation of a set of probabil…
    The viewer will learn how to create two correlated normally distributed random variables in Excel, use a normal distribution to simulate the return on different levels of investment in each of the two funds over a period of ten years, and, create a …

    779 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    16 Experts available now in Live!

    Get 1:1 Help Now