PRB: Can't Read Temporary Table Created Using # Sign in RDOLast reviewed: August 13, 1997Article ID: Q160168 |
The information in this article applies to:
SUMMARYWhen using Remote Data Object (RDO) to create a temporary table with a single pound sign (#) in the SQL statement, it appears that the temporary table is not created in SQL server. When an attempt is made to open this table within the same connection, RDO returns a run-time error.
CAUSEWhen an action query is prepared in RDO and passed to SQL server, a stored procedure is created. However, this stored procedure is dropped after it is executed. Therefore, temporary tables created within the action query are destroyed once that stored procedure ends.
RESOLUTIONTo work around this behavior, create a global temporary object by using a double pound sign (##). For example:
rdoConn.Execute "Select * Into ##Temp1 From Authors" Set rs = rdoConn.OpenResultset("Select * from ##Temp1")Another workaround is to create temporary tables by using stored procedures in SQL server. For implementation details, please see the following article in the Microsoft Knowledge Base:
ARTICLE-ID: Q147938 TITLE : RDO: Getting Data from Temp Tables Created by Stored Procedure STATUSThis behavior is by design.
MORE INFORMATION
Steps to Reproduce Behavior
Keywords : VB4ALL VB4WIN vb5all Version : 4.0 5.0 Platform : NT WINDOWS Issue type : kbprb |
================================================================================
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |