Microsoft KB Archive/76229

{| = Executing a Stored Procedure Through Q+E May Cause UAE =
 * width="100%"|

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.

Steps to Reproduce Problem
To duplicate this problem, run the following macro:

A2: =ACTIVATE(&quot;SHEET1&quot;) A3: =DB.LOGON(&quot;sqlserver&quot;) A4: =DB.SQL.QUERY(2,&quot;use pubs; sp_helpjoins publishers,           authors&quot;,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(&quot;QE&quot;,&quot;SYSTEM&quot;) A3: =EXECUTE(chan,&quot;[LOGON('sqlserver')]&quot;) A4: =ACTIVATE(&quot;sheet1&quot;) A5: =EXECUTE(chan,&quot;[OPEN('use pubs; sp_helpjoins publishers, authors')]&quot;) A6: =EXECUTE(chan,&quot;[COPY.SPECIAL(TRUE,FALSE,1,2)]&quot;) 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.