Microsoft KB Archive/240748

= PRB: Opening a DBase IV File with Long File Name Returns Error =

Article ID: 240748

Article Last Modified on 11/5/1999

-

APPLIES TO


 * Microsoft Visual Basic 5.0 Enterprise Edition
 * Microsoft Visual Basic 6.0 Enterprise Edition

-



This article was previously published under Q240748



SYMPTOMS
When attempting to open a DBase IV file using DAO, and the file has a name greater then eight characters the following error message appears:

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



CAUSE
The cause of the problem is the fact that the file name is greater than eight characters.



RESOLUTION
The workaround is to rename the file using eight characters or less.



Steps to Reproduce Behavior
 Create a Standard EXE project in Visual Basic. Add a Reference to "Microsoft DAO 3.51 Object Library".  Place a command button on the form and add the following code: Private Sub Command1_Click Dim db As Database Dim rs As Recordset

Set db = OpenDatabase("d:\", False, False, "dbase IV;")

' the following line will return error Set rs = db.OpenRecordset("statedata")

Do While Not rs.EOF Debug.Print rs.Fields(0).Value rs.MoveNext Loop

End Sub

 Rename the dBase file to eight characters or less, and earlier code runs without error.

Keywords: kbprb KB240748

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.