SSIS OLEDB Source

  • I am using the OLEDB source to create an XML file. The output of my query should be 2 columns: a file path and the XML. My data access mode is a SQL Command, so I write the full query right there in the control.

    The first time I run it, my file path is 'C:\Test\XML\Output.xml' and everything works just fine.

    Then I want to put the file somewhere else, so the second time I run it the file path is 'C:\Working\XML\Output.xml' and I get a warning and when I try to run the process, it fails.

    The warning is: Truncation may occur due to retrieving data from database column "storeagename" with a length of 23 to data flow column "storeagename" with a length of 19.

    Once you create a string for your filename, you cannot increase its size. If you create the process again from scratch with the longer string, it will work just fine.

    --------------------------------------
    When you encounter a problem, if the solution isn't readily evident go back to the start and check your assumptions.
    --------------------------------------
    It’s unpleasantly like being drunk.
    What’s so unpleasant about being drunk?
    You ask a glass of water. -- Douglas Adams

  • Another solution for this, if you think your filename will change size, is to use an ADO.Net connection instead of OLE DB. ADO.Net allows the increase without a problem, but if you're then connecting to the Export Column transformation, you need to edit it and accept the suggested fix. It just needs to re-establish the parameters.

    --------------------------------------
    When you encounter a problem, if the solution isn't readily evident go back to the start and check your assumptions.
    --------------------------------------
    It’s unpleasantly like being drunk.
    What’s so unpleasant about being drunk?
    You ask a glass of water. -- Douglas Adams

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

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