Calling custom COM objects From DTS

  • Hi,

    Can someone please send me in the right direction here? I've created a small COM object which manipulates some data. The manipulations are complex is way easier to do in COM. I am trying to call this object from a SQL Server 7.0 DTS Package. I am using the custom task and all I receive is a 'general error' when it doesn't run.

    I've never done this before so I copied some of the MS code off MSDN and followed the directions (to the letter!) and created a very small component which implements the DTS interface. That wouldn't run either!

    Is there something very basic I am missing here? I see a lot of articles and advice for calling and using DTS from VB but not much trying to call a DLL from inside DTS. Any article suggestions or just plain old good advice is welcome!!!

    Thanks everyone and please forgive the newbie question!

    Beth

  • Custom tasks are very complex. Keep it simple and use vbScript in an activex transformation. Then all you need to do is:

    Dim obj

    Set obj = createobject("mydll.mycustombunk")

    obj.dosomething

    set obj = nothing

    Be sure the dll is registered on the machine that is calling the dts package as that is where the obj will execute. For example, if you execute the package from your workstation, the dll must be registered there for the createObject statement to work. If you run it from a scheduled job on the server, the dll must be registered on the server.

    Good luck,

    John

  • This makes a lot of sense! Then I don't need to implement the DTS interface, I think. I'll try this and let you know if it works.

    Thanks,

    Beth

  • John,

    Thanks for the help, it worked like a charm once I showed the DBA how to register the components!

    Beth

Viewing 4 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic. Login to reply