Hi everyone,
Not sure if anyone here uses or has used a dbf file.
I am trying to connect to a folder that contains our dbase dbf file.
I am having problem connecting to it.
Can someone please tell me what I am doing wrong based on the error that I am receiving.
Function OpenDBFConn(Path)
Dim Conn: Set Conn = CreateObject("ADODB.Connection"
Conn.Open "Provider=Microsoft.Jet.OLEDB.4.0;" & _
"Data Source=" & Path & ";" & _
"Extended Properties=""DBASE IV;"";"
Set OpenDBFConn = Conn
End Function
dim myConn,SQLstr,RS
Dim DBConn
Set DBConn = OpenDBFConn("c:\tables\layers\pw\dbf"
'Open recordset from Persons table
Dim CommDist
Set CommDist = DBConn.Execute("Select * from comdist2002"
'response.write(sqlstr)
c:\ is the drive followed by a folder called tables; followed by a sub-folder called layers; followed by another sub-folder called pw; followed by yet another folder called dbf.
Within this dbf folder is the dbf file called comdist2002.
Yet, I keep getting following error:
Microsoft JET Database Engine (0x80004005)
c:\tables\layers\pw\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.
I have ensured that everything is spelled correctly.
Thanks in advance
Not sure if anyone here uses or has used a dbf file.
I am trying to connect to a folder that contains our dbase dbf file.
I am having problem connecting to it.
Can someone please tell me what I am doing wrong based on the error that I am receiving.
Function OpenDBFConn(Path)
Dim Conn: Set Conn = CreateObject("ADODB.Connection"
Conn.Open "Provider=Microsoft.Jet.OLEDB.4.0;" & _
"Data Source=" & Path & ";" & _
"Extended Properties=""DBASE IV;"";"
Set OpenDBFConn = Conn
End Function
dim myConn,SQLstr,RS
Dim DBConn
Set DBConn = OpenDBFConn("c:\tables\layers\pw\dbf"
'Open recordset from Persons table
Dim CommDist
Set CommDist = DBConn.Execute("Select * from comdist2002"
'response.write(sqlstr)
c:\ is the drive followed by a folder called tables; followed by a sub-folder called layers; followed by another sub-folder called pw; followed by yet another folder called dbf.
Within this dbf folder is the dbf file called comdist2002.
Yet, I keep getting following error:
Microsoft JET Database Engine (0x80004005)
c:\tables\layers\pw\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.
I have ensured that everything is spelled correctly.
Thanks in advance