Executing a Stored Procedure Through Q+E May Cause UAE

Last reviewed: November 2, 1994
Article ID: Q76229

SUMMARY

Executing a Stored Procedure on a SQL Server with two identical parameters from a macro in Excel 3.0 may cause an Unrecoverable Application Error (UAE) under Windows or a Protect Mode Violation under OS/2.

MORE INFORMATION

Steps to Reproduce Problem

To duplicate this problem, run the following macro:

   A2:  =ACTIVATE("SHEET1")
   A3:  =DB.LOGON("sqlserver")
   A4:  =DB.SQL.QUERY(2,"use pubs; sp_helpjoins ''publishers'',
           ''authors''",1,false)*
   A5:  =RETURN()

QE.XLA must be loaded prior to running this macro. The quotation marks around the table names in the DB.SQL.QUERY statement are two sets of single quotation marks. The entire argument is enclosed in one set of double quotation marks.

The following macro, which uses the DDE Execute command equivalents, will also fail. This macro does not require QE.XLA to be loaded.

   A2:  chan=INITIATE("QE","SYSTEM")
   A3:  =EXECUTE(chan,"[LOGON('sqlserver')]")
   A4:  =ACTIVATE("sheet1")
   A5:  =EXECUTE(chan,"[OPEN('use pubs; sp_helpjoins ''publishers'',
        ''authors''')]")
   A6:  =EXECUTE(chan,"[COPY.SPECIAL(TRUE,FALSE,1,2)]")
   A7:  =PASTE()
   A8:  =TERMINATE(chan)
   A9:  =RETURN()

When executed, these macros start Q+E and bring up the SQL Server LOGON dialog box. After logging on, Q+E starts to perform the query and then generates a UAE.

This problem has been corrected in the version of Q+E that was released with Excel 4.0.

REFERENCES

"Q+E for Microsoft Excel User's Guide," pages 70, 90-100


KBCategory: kbother
KBSubcategory:

Additional reference words: noupd


THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: November 2, 1994
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.