[Webinar] Learn how to a build a cloud-first strategyRegister Now

  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 599
  • Last Modified:

Not a valid path?

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"
rs.open SQL,Conn,2,3


Could any one tell me why I get this error?
  • 2
1 Solution
Carl TawnSystems and Integration DeveloperCommented:
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="
torbjornfahlenAuthor Commented:
Thank you!!!

That was strange, but it worked. =)
Carl TawnSystems and Integration DeveloperCommented:
No problem. For future reference, if you ever need a connection string for pretty much any database, you can look here:


Featured Post

Important Lessons on Recovering from Petya

In their most recent webinar, Skyport Systems explores ways to isolate and protect critical databases to keep the core of your company safe from harm.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now