The information in this article applies to:
SYMPTOMSIn Microsoft Excel, if you use the XLODBC.XLA function SQLRetrieve to retrieve consecutive sets of data on the same channel, the SQLRetrieve function may fail to return any data and one of the following error messages will occur:
-or- For example, the second SQLRetrieve command called may fail if it is expected to return fewer columns of data than the first SQLRetrieve command called on the same channel. RESOLUTIONThis problem no longer occurs if you use the new Visigenic 32-bit Oracle 7 ODBC driver and Microsoft Excel for Windows 95 version 7.0. STATUSMicrosoft has confirmed this to be a problem in the XLODBC.DLL that comes with Microsoft Excel version 5.0 for Windows NT. MORE INFORMATIONMicrosoft provides programming examples for illustration only, without warranty either expressed or implied, including, but not limited to, the implied warranties of merchantability and/or fitness for a particular purpose. This article assumes that you are familiar with the programming language being demonstrated and the tools used to create and debug procedures. Microsoft support professionals can help explain the functionality of a particular procedure, but they will not modify these examples to provide added functionality or construct procedures to meet your specific needs. If you have limited programming experience, you may want to contact the Microsoft fee-based consulting line at (800) 936-5200. For more information about the support options available from Microsoft, please see the following page on the World Wide Web: http://www.microsoft.com/support/supportnet/overview/overview.aspThe following macro example illustrates a situation in which the second SQLRetrieve command does not retrieve any data:
This macro fails because the second query returns fewer columns than the
first query--the second query retrieves only one column of data (EMPLOY_ID)
and the first query retrieves two columns of data (LAST_NAME, FIRST_NAME).
If you are unable to use Microsoft Excel version 7.0 (as recommended in the "Resolution" section of this article), use either of the following sample macros: Sample 1You could successfully execute the macro example above if you interchange the SQLExecquery lines so that one column is returned in the first SQLExecquery and two columns are returned in the second. For example:
Sample 2You can also successfully execute the macro example GetData if you close the data source connection after the first query and then re-establish the connection prior to executing the second query. For example:
Additional query words: 5.00c addin
Keywords : kbcode kbprg ODBCGen |
Last Reviewed: November 9, 1999 © 2000 Microsoft Corporation. All rights reserved. Terms of Use. |