DOCUMENT:Q169426  04-JAN-2000  [odbc]
TITLE   :BUG: Temp SP Generated by SQLPrepare Is Not Dropped
PRODUCT :Open Database Connectivity (ODBC)
PROD/VER:WINDOWS:2.65
OPER/SYS:
KEYWORDS:kbprogramming

======================================================================
-------------------------------------------------------------------------------
The information in this article applies to:

 - Microsoft ODBC Driver for SQL Server, version 2.65 
-------------------------------------------------------------------------------

BUG #: 16643 (SQL)

SYMPTOMS
========

If the SQLSetStmtOption parameter SQL_USE_PROCEDURE_FOR_PREPARE is set to the
value SQL_UP_ON_DROP, the temporary stored procedure generated should be dropped
upon the SQLFreeStmt call with SQL_DROP. However, the temporary stored procedure
generated by SQLPrepare is not dropped until SQLDisconnect if SQLServer execute
syntax is used. This may cause the tempdb to fill up.


WORKAROUND
==========

To work around this problem, use the ODBC syntax (for example, {call sp1}).

STATUS
======

Microsoft has confirmed this to be a problem in the Microsoft SQL Server ODBC
driver version 2.65. We are researching this problem and will post new
information here in the Microsoft Knowledge Base as it becomes available.

Additional query words: 2.65.0240

======================================================================
Keywords          : kbprogramming 
Technology        : kbSQLServSearch kbAudDeveloper kbODBCSearch kbODBCSQLServ265
Version           : WINDOWS:2.65
Issue type        : kbbug

=============================================================================

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.

Copyright Microsoft Corporation 2000.