PRB: SQL Server Local Temp Tables Aren't Created When Parameterized ADO Query Is Used (295743)
The information in this article applies to:
- ActiveX Data Objects (ADO) 2.0, when used with:
- Microsoft SQL Server 2000 (all editions)
- Microsoft SQL Server, Standard Edition 7.0
- Microsoft SQL Server, Enterprise Edition 7.0
- ActiveX Data Objects (ADO) 2.1, when used with:
- Microsoft SQL Server 2000 (all editions)
- Microsoft SQL Server, Standard Edition 7.0
- Microsoft SQL Server, Enterprise Edition 7.0
- ActiveX Data Objects (ADO) 2.5, when used with:
- Microsoft SQL Server 2000 (all editions)
- Microsoft SQL Server, Standard Edition 7.0
- Microsoft SQL Server, Enterprise Edition 7.0
- ActiveX Data Objects (ADO) 2.6, when used with:
- Microsoft SQL Server 2000 (all editions)
- Microsoft SQL Server, Standard Edition 7.0
- Microsoft SQL Server, Enterprise Edition 7.0
- Microsoft OLE DB Provider for SQL Server 7.0
- Microsoft OLE DB Provider for SQL Server 7.01
- Microsoft ODBC Driver for SQL Server 2000.80.194
- Microsoft ODBC Driver for SQL Server 3.6
- Microsoft ODBC Driver for SQL Server 3.7
- Microsoft OLE DB Provider for ODBC 1.0
- Microsoft OLE DB Provider for ODBC 1.1
- Microsoft OLE DB Provider for ODBC 1.5
- Microsoft OLE DB Provider for ODBC 2.0
This article was previously published under Q295743 SYMPTOMS When you run a query against a temporary table created by a
parameterized ActiveX Data Objects (ADO) query, the following error may result:
Error -2147217865 "Invalid Object name '#<table
name>' This problem occurs with both the Microsoft OLEDB
Provider for SQL Server (SQLOLEDB) and the Microsoft OLEDB Provider for ODBC
Driver (MSDASQL) with the SQL Server driver. CAUSE ADO is designed to provide high performance with
parameterized queries. The architecture it uses, however, prevents temporary
tables that are created within a parameterized query from persisting outside of
that query. RESOLUTION Several workarounds are presented in the "More Information"
section of this article. STATUS This behavior is by design.
Modification Type: | Major | Last Reviewed: | 10/31/2003 |
---|
Keywords: | kbprb KB295743 kbAudDeveloper |
---|
|