Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

String over 255 characters

Status
Not open for further replies.

charlize

Programmer
Feb 23, 2005
9
NL
Hello,

I get an XML file with a field that contains over 255 characters. I use a XSD file to import the data in to a SQL table. The XSD file uses the data type string, but then the field is truncated to 255. How can I avoid this?

Charlize
 
XSD is used to define an schema, to validate a document but ... how are you using the XSD to load the file to the DB?

Are you sure there ins't anything else?

I don't think the 256 bytes restricion by default.

Cheers,
Dian
 
I use a SSIS package. Just now, I saw at the advanced editor, that the field has a length of 255. I have changed it and now it works fine. But why is it set to 255 when the field contains more than 255 characters?

Charlize
 
I know nothing about SSIS, but I guess it tries to make it fit on its specification.

Cheers,
Dian
 
It's the SSIS default for varchar datatype. (The "Wizards" don't ask many questions, they just make a lot of assumptions.) Either fix the SSIS package, or create your result table ahead of time with column sizes that are closer to what you want.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top