XSD: Table y's type of column x is too tiny to store data

sqlbulkcopy sql-server-2008 xsd

Question

I am generating an XSD file based on the columns in my xml. I give them all the type, "xs:string". Then I try to import the file into my database using .NET with SQLbulk import, but for some fields are to small. I get the message, "type of column x in table y is too small to hold data"

What type should I use for large amount of text (so to generate a text field in the database using sqlbulk.execute)? The current one creates a nvarchar(1000) field, and the data in some fields is bigger

1
1
9/29/2010 12:06:08 PM

Accepted Answer

The trick was to add sql:datatype="nvarchar(4000)"

0
9/29/2010 12:25:16 PM


Related Questions





Licensed under: CC-BY-SA with attribution
Not affiliated with Stack Overflow
Licensed under: CC-BY-SA with attribution
Not affiliated with Stack Overflow