Microsoft KB Archive/293862

= FIX: Excel ODBC Driver Cannot Open Excel 4.0 XLS Files =

Article ID: 293862

Article Last Modified on 11/25/2003

-

APPLIES TO


 * Microsoft Data Access Components 2.1
 * Microsoft Data Access Components 2.1 Service Pack 2
 * Microsoft Data Access Components 2.1 Service Pack 1
 * Microsoft Data Access Components 2.1 Service Pack 2
 * Microsoft Data Access Components 2.5 Service Pack 1
 * Microsoft Data Access Components 2.5

-



This article was previously published under Q293862



SYMPTOMS
If you try to open a Microsoft Excel 4.0 file, the ODBC Microsoft Jet driver may return the following error message:

[Microsoft][ODBC Excel Driver] The Microsoft Jet database engine could not find the object 'ODBCTest.xls'. Make sure the object exists and that you spell its name and the path name correctly.



STATUS
Microsoft has confirmed that this is a bug in the Microsoft products that are listed at the beginning of this article. This bug was corrected in Microsoft Jet 4.0 Service Pack 5. For additional information about the latest Jet 4.0 service pack, click the following article number to view the article in the Microsoft Knowledge Base:

239114 How To: Obtain the Latest Service Pack for the Microsoft Jet 4.0 Database Engine



Steps to Reproduce Behavior
The following steps only reproduce the error on a computer with Microsoft Jet 4.0 Service Pack 4 or earlier.  Create a data source name (DSN) called ExcelTest for an Excel 4.0 file. Create a new Standard EXE project in Microsoft Visual Basic. Set a project reference to Microsoft ActiveX Data Objects 2.6..  Paste the following code into the code section of Form1: Option Explicit

Const strConn = &quot;DSN=ExcelTest&quot; Const strSQL = &quot;SELECT * FROM [Sheet1$]&quot;

Private Sub Form_Load Dim cn As ADODB.Connection Set cn = New ADODB.Connection cn.Open strConn Dim rs As ADODB.Recordset Set rs = New ADODB.Recordset With rs       .CursorLocation = adUseClient .Open strSQL, cn       Debug.Print .Fields(0) .Close End With Set rs = Nothing cn.Close Set cn = Nothing End Sub  Run the project. Notice that you receive the above-mentioned error message.

Additional query words: spreadsheet

Keywords: kbbug kbfix kbvs600sp5fix kbiisam kbdatabase kbjet kbmdacnosweep KB293862

-

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

© Microsoft Corporation. All rights reserved.