The information in this article applies to:
SYMPTOMS
In the versions of Microsoft Excel listed above, you may receive the
following error message when you use the SQLRequest function in a Visual
Basic, Applications Edition, macro:
This error message will occur if the SQLRequest function returns a result set containing more than 4095 elements. CAUSEThe SQLRequest function has an argument called ColNamesLogical, which specifies whether to return field headings. If this argument is set to TRUE, then in the case above you can only return up to 4094 elements or cells and 1 field heading. If ColNamesLogical is set to FALSE or is omitted, then you can return only 4095 records. RESOLUTION
To return a result set with more than 4095 elements, use the SQLRetrieve function as it's used in the following sample procedure:
Sample Visual Basic ProcedureThis procedure opens a channel to a given data source, executes a query, retrieves the result set to the active cell on the active worksheet, and closes the channel opened by SQLOpen:
STATUSMicrosoft has confirmed this to be a problem in the Microsoft products listed at the beginning of this article. We are researching this problem and will post new information here in the Microsoft Knowledge Base as it becomes available. REFERENCES
For more information on the SQLRequest and SQLRetrieve functions choose the
Search button in Visual Basic Reference Help and type: Additional query words: 5.00c
Keywords : |
Last Reviewed: July 29, 1999 © 2000 Microsoft Corporation. All rights reserved. Terms of Use. |