How to create XML documents over 8000 bytes?

I have a script transform object that is creating XML to be inserted into a SQL 2005 database.

It seems only an N_TEXT can be inserted, but N_TEXT is read-only in the script task.  The only way I've found to make this work is to have the script transform produce the XML into a DT_STR(8000) string, then convert that to N_TEXT in a Data Conversion task so it can be inserted.

Now I have a problem in that my XML has exceeded the 8000 byte DT_STR data type.  Is there another way to do this

Jay


Answer this question

How to create XML documents over 8000 bytes?

  • Fran-1980

    Ah, answered my own question.  Seems I knew this at one point already and somehow forgot it.  The knowledge was returned to me (along with a curious look) from a guy I bestowed it upon only a few short months ago. Thanks Greg.

    The DT_NTEXT can be manipulated in the script task, you just have to work at it a bit.  You can't just say Row.Text = "Hello", you have to say Row.Text.AddBlobData(ASCII.GetBytes("Hello")).

    Jay

  • Clinton Cherry

    Actually, since we're talking about NTEXT, that should be Unicode.GetBytes().

  • How to create XML documents over 8000 bytes?