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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

dbf connection error

Status
Not open for further replies.

siena

Technical User
Jan 30, 2003
262
0
0
US
Sorry but it's me again.

I am using this function to connect to a dbf file.

I keep getting the following error:


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 DBConn
Set DBConn = OpenDBFConn("D:\Inetpub\'Open recordset from TrafficCounts able

Dim rsWaterShed
Set rsWaterShed = DBConn.Execute("SELECT * FROM fctraffic02.dbf ")

The Microsoft Jet database engine could not find the object 'fctraffic02.dbf'. Make sure the object exists and that you spell its name and the path name correctly

What is so strange about it all is that if I use another dbf file on the same directory, it works.
Could it be because this dbf file that is giving me grief was created today?
Please help!
 
I remember some dBase providers had DOS filename limit (8+3). Is that the case here?
 
DBF has fieldname limit of 9 characters.
That's about it.
 
vongrunt,
Bless your smart heart.
You are absolutely right.
Strange again because we have some with 11 characters but it works and I thank you a lot.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top