PRB: Error in ADO Recordset with 255 Fields from Visual FoxPro Table (300184)
The information in this article applies to:
- Microsoft Data Access Components 2.0
- Microsoft Data Access Components 2.1
- Microsoft Data Access Components 2.1 SP1
- Microsoft Data Access Components 2.1 SP2
- Microsoft Data Access Components 2.5
- Microsoft Data Access Components 2.5 SP1
- Microsoft Data Access Components 2.6
- Microsoft Visual FoxPro for Windows 6.0
This article was previously published under Q300184 SYMPTOMS
If you try to access a field of an ADO Recordset whose source is a SQL SELECT statement that retrieves 255 columns from a Visual FoxPro table, you receive the following error message:
Run-time error '-2147467259(80004005)':
[Microsoft][ODBC Visual FoxPro Driver] Invalid column number
CAUSE
This is a known limitation of the ODBC Driver for Visual FoxPro. You can only use the ODBC Driver for Visual FoxPro to successfully open and manipulate ADO Recordsets that contain up to 254 fields.
RESOLUTION
To fix this problem, upgrade to the version of OLE DB Provider for Visual FoxPro that ships with Visual FoxPro version 7.0.
To work around this problem, when you use the ODBC Driver for Visual FoxPro, you must to restrict your query to retrieve only the columns that need to be manipulated in your ActiveX Data Objects (ADO) code instead of running a "SELECT * from <TableName>" query against a Visual FoxPro table with 255 columns. If your code needs to access all of the 255 columns in a Visual FoxPro table, consider opening and manipulating two distinct ADO Recordsets, each of which contains a subset of the columns in the base table.
STATUSMicrosoft has confirmed that this is a problem in the ODBC Driver for Visual FoxPro that ships with the Microsoft products that are listed at the beginning of this article.
This bug was corrected in the OLE DB Provider for Visual FoxPro that ships only with Visual FoxPro version 7.0.
Modification Type: | Major | Last Reviewed: | 12/3/2003 |
---|
Keywords: | kbprb KB300184 |
---|
|