SSIS - XML Source to OLE DB Command problem

  • I have an SSIS package that is trying to pull from an XML Source and into an OLE DB Command.

    My goal is to read the inputs from the XML file one "record" at a time, and then if the data isn't in the DB - push it in through the OLE DB Command.

    In my OLE DB Command I have set my SQLCommand property to be: EXEC Title_Change_Process @rowCount = ?, @HRtitle = ?, @currentTitle = ?, @facultyID = ?

    That's when I get the error: Parameters are not bound. All parameters in the SQL command must be bound to input columns.

    When I change the SQLCommand property to: EXEC Title_Change_Process @rowCount = 0, @HRtitle = ?, @currentTitle = NULL, @facultyID = ? (because I only need 2 inputs from the file - yet I have 4 variables in the procedure) I get the following error: Columns "Title" and "@HRTitle" cannot convert between unicode and non-unicode string data types.

    I've tried a bunch of other suggestions while researching this problem - nothing has worked - what can I do to fix this? I've only really just started using SSIS.

  • Ok, now I see in the OLE DB Command 'Advanced Editor for OLE DB Command' under the 'Input and Output' tab, the 'Data Type Properties of my parameters (or 'External Columns') do not match the data type of the 'Input Columns'.

    My 'Input Columns' have a type of: DT_WSTR. My 'External Columns' have a data type of DT_STR - which the system is not allowing me to alter. It continues to default to DT_STR and the length of the field as specified in my stored procedure.

    How to I get the system to understand I want my 'External Columns' to be DT_WSTR and keep the value once I've set it??:unsure:?

  • I think I have it figured out!

    SSIS is expecting UNICODE data strings. But in the stored procedure I wrote I'm using varchar for my data types. So when SSIS reads my stored procedure parameters into the 'External Columns' on the 'Input Output Properties' tab, it is seeing a conflict between UNICODE that it expects, and my procedure's varchar (which is a non-UNICODE data type).

    So by changing the datatypes to nvarchar in my stored procedure, the problem goes away! YAY! 🙂

  • hello

    i am having a similar problem

    my out parameter in my sp is of a nvarchar(max) type

    and column im passing in the ole db cammand is of type NTEXT; which should match

    however it is not modifying the column and it is staying un changed

    i tried changing my output column to nvarchar(50) and it worked

    but thats not possible since i have to return XML columns ( thats why im using nvarchar(max); type xml couldn't be read by ole db for some reason :s)

    have ay ideas how to go about this

    any help is appreciated

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

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