Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Connecting to a dbf file

Status
Not open for further replies.

janise

Technical User
May 25, 2003
161
US
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
 
define the dbf folder as a virtual folder (IIS), and give it read/write permissions.

hth,
Foxbox
ttmug.gif
 
I believe I have done that but I still get same error.
 
on my W2K box this works oke, but i gave the IUSR_<server> read/write permission for the folder. You seem to be sure about the path, so i presume it is a user permission thing.

hth,
Foxbox
ttmug.gif
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top