You receive an error message when you run a custom task that is written in Visual Basic 6.0 (328485)
The information in this article applies to:
- Microsoft Visual Basic Professional Edition for Windows 6.0
- Microsoft SQL Server 2000 (all editions)
This article was previously published under Q328485 SYMPTOMSWhen you run a custom task that is written in Microsoft Visual Basic 6.0, or when you run any other apartment-threaded task, you may receive the following error message:
Source : Microsoft Data Transformation Services (DTS) Package
Error : [-2147008511]
Description: Not implemented CAUSEThis behavior occurs because of marshaling between threaded apartments. The Data Transformation Services (DTS) components are marked in the registry as both. When they are instantiated in the multithreaded apartment (MTA), they try to instantiate the component in the custom task in the MTA also.
However, Visual Basic 6.0 components are apartment threaded. Therefore, Visual Basic 6.0 components cannot reside in the MTA. They must be loaded on the default single-threaded apartment (STA). This behavior causes the error that is described in the "Symptoms" section.WORKAROUNDTo run a custom task that is written in Visual Basic 6.0, or to run any other apartment-threaded task, you must include the following directive in your Microsoft ASP.NET (.aspx) page: <%@ Page ASPCompat="true" %> This directive causes ASP.NET to execute the page in the STA thread instead of in the default MTA thread. This directive causes the DTS components to be instantiated in the STA. Therefore, marshaling between threaded apartments does not occur. STATUS
This behavior is by design.REFERENCES
For additional information, click the following article number to view the article in the Microsoft Knowledge Base:
318402
How to set the COM apartment type in managed threads
Modification Type: | Minor | Last Reviewed: | 8/18/2005 |
---|
Keywords: | kbASP kbinterop kbDeployment kbhowto KB328485 kbAudDeveloper kbAudITPRO |
---|
|