Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 Import/Export (DTS) and Replication (2000)
 Read CustomTask property in ActiveX script

Author  Topic 

igorsp
Starting Member

1 Post

Posted - 2005-04-21 : 04:17:28
I hav a CustomTask, íàïèñàííûé â .NET
It transforms RowSet into XML and writes the resulted string to his public property XMLConverted, which is defined as string.
Now, I want to read it in ActiveX Script task

The code:
DIM APackage,ATask,AnXMLConvertor
SET APackage = DTSGlobalVariables.Parent
SET ATask = APackage.Tasks("CustomTask_XMLConvertor")
SET AnXMLConvertor = ATask.CustomTask
DTSGlobalVariables("ResultedXML").Value = AnXMLConvertor.XMLConverted

I recieve an error, because CustomTask does not have a property named XMLConverted. (Obvious - not casted)

I try to write as in VB:
DIM AnXMLConvertor AS XMLConvertor
causes syntax error.

How can I access the property, or, how can I cast CustomTask to XMLConvertor?

By the way, it strange, but the followed code works properly:
DIM APackage,ATask,ACustomTask
SET ATask = APackage.Tasks("ExecuteSQLTask_SomeTask")
SET ACustomTask = ATask.CustomTask
ACustomTask.SQLStatement = "SELECT * FROM authors"

CustomTask objects does not have a property SQLStatement
   

- Advertisement -