Problems changing DataSource dynamically on DTS

  • Hi! I'm new here and I'm not sure if it's the right place to post my question but here i go anyway...

    I have a DTS package that imports from an Excel file to a table in SQL 2000, The DTS worked fine, but when i try to change dinamically the DataSource (cause the filename is in a field on another table), i get the error "Cannot update. Database or object is read-only".

    I've tried using a Dynamic Properties Task and also tried with Active Script Task like

    function Main()

    Dim oConn, sFilename

    sFilename = DTSGlobalVariables("FileLoc").Value

    Set oConn = DTSGlobalVariables.Parent.Connections("ExcelFile")

    oConn.DataSource = sFilename

    Set oConn = Nothing

    Main = DTSTaskExecResult_Success

    end function

    I get same error all the time, running DTS from QA with

    DTSRun /S "(local)" /N "test" /G "{75506229-6B9D-4172-986B-D0464D211960}" /A "FileLoc":"8"="C:\MyExcel.xsl" /W "0" /E

    and running from dtsrunui.

    I don't know what else to try, I'll appreciate any help.

    Thanks in advance

  • Hi, check up if the file is closed, Excel file.

Viewing 2 posts - 1 through 1 (of 1 total)

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