XSD:表 y 中列 x 的类型太小,无法容纳数据

发布于 2024-09-14 05:19:52 字数 224 浏览 1 评论 0原文

我正在根据 xml 中的列生成 XSD 文件。我给他们所有的类型,“xs:string”。然后我尝试使用 .NET 和 SQLbulk import 将文件导入到我的数据库中,但某些字段太小。我收到消息“表 y 中的列 x 的类型太小,无法容纳数据”

对于大量文本,我应该使用什么类型(以便使用 sqlbulk.execute 在数据库中生成文本字段)?当前创建的是nvarchar(1000)字段,部分字段数据比较大

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

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

孤独患者 2024-09-21 05:19:52

诀窍是添加 sql:datatype="nvarchar(4000)"

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

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文