0 Replies Latest reply on Apr 25, 2007 4:35 PM by CF_crazee

    DTS DLL problem

    CF_crazee
      I am using a DTS package DLL to convert SQL Server views into flat files that can be downloaded using a ColdFusion webapplication

      The DLL takes a view name and a file name and a tablename (type of table) as input and creates flat file, this worked perfectly on the old server but now we have a new server with identical configuration and it is throwing this error as shown below. The CFC calls initiates and calls the DLL as necessary. The DLL and all the necessary supporting DTS DLL are correctly registered on the server.

      An exception occurred when executing a Com method.
      The cause of this exception was that: AutomationException: 0x800403ec - Connection 'Microsoft OLE DB Provider for SQL Server' already exists in the collection. in 'Microsoft Data Transformation Services (DTS) Package'.

      The error occurred in E:\Inetpub\wwwroot\PDMS\Components\ExportToText.cfc: line 11
      Called from E:\Inetpub\wwwroot\PDMS\Query\Download\downloadwithDllcheck.cfm: line 6
      Called from E:\Inetpub\wwwroot\PDMS\Components\ExportToText.cfc: line 11
      Called from E:\Inetpub\wwwroot\PDMS\Query\Download\downloadwithDllcheck.cfm: line 6

      9 : <cfscript>
      10 : obj = CreateObject("COM", "ExportToText.ExportViewToText");
      11 : obj.MainDTSSQLRoutine(#arguments.viewName#, #arguments.fileName#, #arguments.tableName#);
      12 : //ReleaseComObject("obj");
      13 : </cfscript>


      here is the code for the CFC

      <!--- This is the component to convert a view to text --->
      <cfcomponent displayname="View To Text">
      <cffunction displayname="ViewToText" name="ViewToText" hint="SQL Server View To ASCII flat file" output="false">
      <cfargument displayname="View Name" name="viewName" type="string" required="yes">
      <cfargument displayname="File Name" name="fileName" type="string" required="yes">
      <cfargument displayname="Table Name" name="tableName" type="string" required="yes">


      <cfscript>
      obj = CreateObject("COM", "ExportToText.ExportViewToText");
      obj.MainDTSSQLRoutine(#arguments.viewName#, #arguments.fileName#, #arguments.tableName#);
      //ReleaseComObject("obj");
      </cfscript>
      </cffunction>
      </cfcomponent>


      Thanks for any help