Microsoft KB Archive/328485

= You receive an error message when you run a custom task that is written in Visual Basic 6.0 =

Article ID: 328485

Article Last Modified on 8/18/2005

-

APPLIES TO


 * Microsoft Visual Basic 6.0 Professional Edition
 * Microsoft SQL Server 2000 Standard Edition

-



This article was previously published under Q328485



SYMPTOMS
When 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



CAUSE
This 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 &quot;Symptoms&quot; section.



WORKAROUND
To 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=&quot;true&quot; %> 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.

